gw.cpp: In function 'bool f(int, std::vector<Element>&)':
gw.cpp:51:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Element>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
51 | while (islands < mid && index < T.size()) {
| ~~~~~~^~~~~~~~~~
gw.cpp:53:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Element>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | while (index < T.size() && T[index].val == currVal) {
| ~~~~~~^~~~~~~~~~
gw.cpp:57:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
57 | bool right = curr.ind == v.size() - 1 || !v[curr.ind + 1];
| ~~~~~~~~~^~~~~~~~~~~~~~~
gw.cpp:60:38: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
60 | bool negRight = curr.ind != v.size() - 1 && v[curr.ind + 1];
| ~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/bits/alloc_traits.h:33,
from /usr/include/c++/10/ext/alloc_traits.h:34,
from /usr/include/c++/10/bits/basic_string.h:40,
from /usr/include/c++/10/string:55,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from gw.cpp:1:
/usr/include/c++/10/bits/stl_construct.h: In instantiation of 'void std::_Construct(_Tp*, _Args&& ...) [with _Tp = Element; _Args = {}]':
/usr/include/c++/10/bits/stl_uninitialized.h:567:18: required from 'static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = Element*; _Size = long unsigned int; bool _TrivialValueType = false]'
/usr/include/c++/10/bits/stl_uninitialized.h:623:20: required from '_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = Element*; _Size = long unsigned int]'
/usr/include/c++/10/bits/stl_uninitialized.h:685:44: required from '_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, std::allocator<_Tp>&) [with _ForwardIterator = Element*; _Size = long unsigned int; _Tp = Element]'
/usr/include/c++/10/bits/stl_vector.h:1606:36: required from 'void std::vector<_Tp, _Alloc>::_M_default_initialize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = Element; _Alloc = std::allocator<Element>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
/usr/include/c++/10/bits/stl_vector.h:512:9: required from 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = Element; _Alloc = std::allocator<Element>; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<Element>]'
gw.cpp:22:31: required from here
/usr/include/c++/10/bits/stl_construct.h:109:7: error: no matching function for call to 'Element::Element()'
109 | { ::new(static_cast<void*>(__p)) _Tp(std::forward<_Args>(__args)...); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gw.cpp:10:5: note: candidate: 'Element::Element(int, int)'
10 | Element(int val, int ind) : val(val), ind(ind) {}
| ^~~~~~~
gw.cpp:10:5: note: candidate expects 2 arguments, 0 provided
gw.cpp:6:7: note: candidate: 'constexpr Element::Element(const Element&)'
6 | class Element {
| ^~~~~~~
gw.cpp:6:7: note: candidate expects 1 argument, 0 provided
gw.cpp:6:7: note: candidate: 'constexpr Element::Element(Element&&)'
gw.cpp:6:7: note: candidate expects 1 argument, 0 provided