/in/foo.cc:9:15: error: expected ')' before 'time1'
bool cmp(time time1,time time2){
^~~~~
/in/foo.cc:9:26: error: expected ')' before 'time2'
bool cmp(time time1,time time2){
^~~~~
/in/foo.cc:9:31: error: expression list treated as compound expression in initializer [-fpermissive]
bool cmp(time time1,time time2){
^
/in/foo.cc:9:31: warning: left operand of comma operator is a reference, not call, to function 'time' [-Waddress]
/in/foo.cc:9:31: warning: left operand of comma operator has no effect [-Wunused-value]
/in/foo.cc:9:32: error: expected ',' or ';' before '{' token
bool cmp(time time1,time time2){
^
In file included from /usr/include/c++/6/bits/stl_algobase.h:71:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = time*; _Iterator2 = time*; _Compare = bool]':
/usr/include/c++/6/bits/stl_algo.h:1844:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1882:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1968:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = time*; _Compare = bool]'
/in/foo.cc:18:27: required from here
/usr/include/c++/6/bits/predefined_ops.h:125:18: error: expression cannot be used as a function
{ return bool(_M_comp(*__it1, *__it2)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = time; _Iterator = time*; _Compare = bool]':
/usr/include/c++/6/bits/stl_algo.h:1825:20: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Val_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1852:36: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1882:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1968:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = time*; _Compare = bool]'
/in/foo.cc:18:27: required from here
/usr/include/c++/6/bits/predefined_ops.h:173:11: error: expression cannot be used as a function
{ return bool(_M_comp(__val, *__it)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = time*; _Value = time; _Compare = bool]':
/usr/include/c++/6/bits/stl_heap.h:129:48: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = time*; _Distance = long int; _Tp = time; _Compare = __gnu_cxx::__ops::_Iter_comp_val<bool>]'
/usr/include/c++/6/bits/stl_heap.h:230:23: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = time*; _Distance = long int; _Tp = time; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_heap.h:335:22: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1669:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1930:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1945:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = time*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:1965:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = time*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = time*; _Compare = bool]'
/in/foo.cc:18:27: required from here
/usr/include/c++/6/bits/predefined_ops.h:147:11: error: expression cannot be used as a function
{ return bool(_M_comp(*__it, __val)); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~