prog.cpp: In function 'T binary_search(T, T, V)':
prog.cpp:22:4: error: expected primary-expression before 'else'
else if (*current > find){
^
prog.cpp: In instantiation of 'T binary_search(T, T, V) [with T = std::_List_iterator<int>; V = int]':
prog.cpp:44:48: required from here
prog.cpp:10:10: error: no match for 'operator>' (operand types are 'std::_List_iterator<int>' and 'std::_List_iterator<int>')
if(left > right){
^
In file included from /usr/include/c++/5/list:63:0,
from prog.cpp:5:
/usr/include/c++/5/bits/stl_list.h:1849:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator>(const std::list<_Tp, _Alloc>&, const std::list<_Tp, _Alloc>&)
operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
^
/usr/include/c++/5/bits/stl_list.h:1849:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::list<_Tp, _Alloc>'
if(left > right){
^
In file included from /usr/include/c++/5/vector:64:0,
from prog.cpp:4:
/usr/include/c++/5/bits/stl_vector.h:1541:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator>(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
^
/usr/include/c++/5/bits/stl_vector.h:1541:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::vector<_Tp, _Alloc>'
if(left > right){
^
In file included from /usr/include/c++/5/string:52:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:1:
/usr/include/c++/5/bits/basic_string.h:5046:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
operator>(const _CharT* __lhs,
^
/usr/include/c++/5/bits/basic_string.h:5046:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: mismatched types 'const _CharT*' and 'std::_List_iterator<int>'
if(left > right){
^
In file included from /usr/include/c++/5/string:52:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:1:
/usr/include/c++/5/bits/basic_string.h:5034:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
/usr/include/c++/5/bits/basic_string.h:5034:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
if(left > right){
^
In file included from /usr/include/c++/5/string:52:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:1:
/usr/include/c++/5/bits/basic_string.h:5022:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
/usr/include/c++/5/bits/basic_string.h:5022:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
if(left > right){
^
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 prog.cpp:1:
/usr/include/c++/5/bits/stl_iterator.h:1119:5: note: candidate: template<class _Iterator> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
operator>(const move_iterator<_Iterator>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:1119:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::move_iterator<_Iterator>'
if(left > right){
^
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 prog.cpp:1:
/usr/include/c++/5/bits/stl_iterator.h:1113:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
operator>(const move_iterator<_IteratorL>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:1113:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::move_iterator<_Iterator>'
if(left > right){
^
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 prog.cpp:1:
/usr/include/c++/5/bits/stl_iterator.h:360:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator>(const reverse_iterator<_IteratorL>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:360:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
if(left > right){
^
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 prog.cpp:1:
/usr/include/c++/5/bits/stl_iterator.h:310:5: note: candidate: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator>(const reverse_iterator<_Iterator>& __x,
^
/usr/include/c++/5/bits/stl_iterator.h:310:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
if(left > right){
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:64: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 prog.cpp:1:
/usr/include/c++/5/bits/stl_pair.h:233:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
/usr/include/c++/5/bits/stl_pair.h:233:5: note: template argument deduction/substitution failed:
prog.cpp:10:10: note: 'std::_List_iterator<int>' is not derived from 'const std::pair<_T1, _T2>'
if(left > right){
^