Language
C++
Compiler
gcc HEAD 8.0.1 20180408 (experimental)
Options
Warnings
Boost 1.66.0
C++2a(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.66.0/gcc-head/include -std=gnu++2a
Exit Code:
1
Author
anonymous
almost 7 years ago
C++
gcc HEAD 8.0.1 20180408 (experimental)
Author
anonymous
almost 7 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.66.0/gcc-head/include -std=gnu++2a
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)
^~~~