garage.cpp: In member function 'bool ParkSpace::operator<(ParkSpace)':
garage.cpp:21:24: warning: statement has no effect [-Wunused-value]
21 | this->Occupied < c2.Occupied;
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
garage.cpp:22:5: warning: no return statement in function returning non-void [-Wreturn-type]
22 | }
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from garage.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&) const [with _Iterator = __gnu_cxx::__normal_iterator<ParkSpace*, std::vector<ParkSpace> >; _Value = const int]':
/usr/include/c++/10/bits/stl_algobase.h:1324:14: required from '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<ParkSpace*, std::vector<ParkSpace> >; _Tp = int; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
/usr/include/c++/10/bits/stl_algobase.h:1359:32: required from '_ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = __gnu_cxx::__normal_iterator<ParkSpace*, std::vector<ParkSpace> >; _Tp = int]'
garage.cpp:59:61: required from here
/usr/include/c++/10/bits/predefined_ops.h:67:22: error: no match for 'operator<' (operand types are 'ParkSpace' and 'const int')
67 | { return *__it < __val; }
| ~~~~~~^~~~~~~
garage.cpp:20:10: note: candidate: 'bool ParkSpace::operator<(ParkSpace)'
20 | bool operator <(ParkSpace c2){
| ^~~~~~~~
garage.cpp:20:31: note: no known conversion for argument 1 from 'const int' to 'ParkSpace'
20 | bool operator <(ParkSpace c2){
| ~~~~~~~~~~^~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from garage.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1096:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)'
1096 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1096:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from garage.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note: 'ParkSpace' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
67 | { return *__it < __val; }
| ~~~~~~^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from garage.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1104:5: note: candidate: 'template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)'
1104 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1104:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from garage.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h:67:22: note: 'ParkSpace' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
67 | { return *__it < __val; }
| ~~~~~~^~~~~~~