Author
anonymous
about 7 years ago
Language
Compiler
Options
Author
anonymous
about 7 years ago
$
prog.cc: In function 'int main()':
prog.cc:16:28: error: call of overloaded 'sort(std::vector<int>::iterator, std::vector<int>::iterator)' is ambiguous
sort(v.begin(), v.end());
^
prog.cc:7:6: note: candidate: 'void sort(Iterator, Iterator) [with Iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
void sort(Iterator beginning,
^~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.1/algorithm:62,
from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/8.0.1/bits/stl_algo.h:4824:5: note: candidate: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
^~~~
Exit Code:
1