Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

.

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.43 sec, absolute service time: 0,52 sec 
edit mode |  history
Error(s):
source_file.cpp: In function ‘int main()’:
source_file.cpp:20:8: warning: unused variable ‘res’ [-Wunused-variable]
   bool res = a < b;
        ^
In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/5/bits/char_traits.h:39,
                 from /usr/include/c++/5/ios:40,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from source_file.cpp:1:
/usr/include/c++/5/bits/predefined_ops.h: In instantiation of ‘constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = const test::SomePOD*; _Iterator2 = const test::SomePOD*]’:
/usr/include/c++/5/bits/stl_algobase.h:899:14:   required from ‘bool std::__lexicographical_compare_impl(_II1, _II1, _II2, _II2, _Compare) [with _II1 = const test::SomePOD*; _II2 = const test::SomePOD*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’
/usr/include/c++/5/bits/stl_algobase.h:920:44:   required from ‘static bool std::__lexicographical_compare<_BoolType>::__lc(_II1, _II1, _II2, _II2) [with _II1 = const test::SomePOD*; _II2 = const test::SomePOD*; bool _BoolType = false]’
/usr/include/c++/5/bits/stl_algobase.h:956:60:   required from ‘bool std::__lexicographical_compare_aux(_II1, _II1, _II2, _II2) [with _II1 = const test::SomePOD*; _II2 = const test::SomePOD*]’
/usr/include/c++/5/bits/stl_algobase.h:1232:48:   required from ‘bool std::lexicographical_compare(_II1, _II1, _II2, _II2) [with _II1 = __gnu_cxx::__normal_iterator<const test::SomePOD*, std::vector<test::SomePOD> >; _II2 = __gnu_cxx::__normal_iterator<const test::SomePOD*, std::vector<test::SomePOD> >]’
/usr/include/c++/5/bits/stl_vector.h:1529:42:   required from ‘bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&) [with _Tp = test::SomePOD; _Alloc = std::allocator<test::SomePOD>]’
source_file.cpp:20:18:   required from here
/usr/include/c++/5/bits/predefined_ops.h:43:23: error: no match for ‘operator<’ (operand types are ‘const test::SomePOD’ and ‘const test::SomePOD’)
       { return *__it1 < *__it2; }
                       ^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/5/bits/char_traits.h:39,
                 from /usr/include/c++/5/ios:40,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from source_file.cpp:1:
/usr/include/c++/5/bits/stl_iterator.h:849: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>&)
     operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
     ^
/usr/include/c++/5/bits/stl_iterator.h:849:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/5/bits/char_traits.h:39,
                 from /usr/include/c++/5/ios:40,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from source_file.cpp:1:
/usr/include/c++/5/bits/predefined_ops.h:43:23: note:   ‘const test::SomePOD’ is not derived from ‘const __gnu_cxx::__normal_iterator<_IteratorL, _Container>’
       { return *__it1 < *__it2; }
                       ^
In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/5/bits/char_traits.h:39,
                 from /usr/include/c++/5/ios:40,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from source_file.cpp:1:
/usr/include/c++/5/bits/stl_iterator.h:856: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>&)
     operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
     ^
/usr/include/c++/5/bits/stl_iterator.h:856:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/5/bits/char_traits.h:39,
                 from /usr/include/c++/5/ios:40,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from source_file.cpp:1:
/usr/include/c++/5/bits/predefined_ops.h:43:23: note:   ‘const test::SomePOD’ is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’
       { return *__it1 < *__it2; }
                       ^