Author
anonymous
almost 7 years ago
Language
C++
Compiler
gcc HEAD 9.0.1 20190411 (experimental)
Options
Warnings
Don't Use Boost
C++2a(GNU)
no pedantic
Author
anonymous
almost 7 years ago
$ g++ prog.cc -Wall -Wextra -std=gnu++2a prog.cc: In function 'int main()':
prog.cc:10:25: error: no matching function for call to 'min(bool&, int&)'
10 | return std::min(a, b);
| ^
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/algorithm:61,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algobase.h:198:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
198 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algobase.h:198:5: note: template argument deduction/substitution failed:
prog.cc:10:25: note: deduced conflicting types for parameter 'const _Tp' ('bool' and 'int')
10 | return std::min(a, b);
| ^
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/algorithm:61,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algobase.h:246:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
246 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algobase.h:246:5: note: template argument deduction/substitution failed:
prog.cc:10:25: note: deduced conflicting types for parameter 'const _Tp' ('bool' and 'int')
10 | return std::min(a, b);
| ^
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/algorithm:62,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algo.h:3434:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3434 | min(initializer_list<_Tp> __l)
| ^~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algo.h:3434:5: note: template argument deduction/substitution failed:
prog.cc:10:25: note: mismatched types 'std::initializer_list<_Tp>' and 'bool'
10 | return std::min(a, b);
| ^
In file included from /opt/wandbox/gcc-head/include/c++/9.0.1/algorithm:62,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algo.h:3440:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3440 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/opt/wandbox/gcc-head/include/c++/9.0.1/bits/stl_algo.h:3440:5: note: template argument deduction/substitution failed:
prog.cc:10:25: note: mismatched types 'std::initializer_list<_Tp>' and 'bool'
10 | return std::min(a, b);
| ^
Exit Code:
1