Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C++

Compiler

gcc HEAD 10.0.0 20191203 (experimental)

Options
Warnings
Boost 1.71.0
C++2a(GNU)
no pedantic

Author

anonymous

over 5 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.71.0/gcc-head/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:6:22: error: no matching function for call to 'min(double&, int)'
    6 |     x = std::min(x, 0);
      |                      ^
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/algorithm:61,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algobase.h:253:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  253 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algobase.h:253:5: note:   template argument deduction/substitution failed:
prog.cc:6:22: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
    6 |     x = std::min(x, 0);
      |                      ^
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/algorithm:61,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algobase.h:301:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  301 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algobase.h:301:5: note:   template argument deduction/substitution failed:
prog.cc:6:22: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
    6 |     x = std::min(x, 0);
      |                      ^
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/algorithm:62,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algo.h:3550:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
 3550 |     min(initializer_list<_Tp> __l)
      |     ^~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algo.h:3550:5: note:   template argument deduction/substitution failed:
prog.cc:6:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
    6 |     x = std::min(x, 0);
      |                      ^
In file included from /opt/wandbox/gcc-head/include/c++/10.0.0/algorithm:62,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algo.h:3556:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
 3556 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/opt/wandbox/gcc-head/include/c++/10.0.0/bits/stl_algo.h:3556:5: note:   template argument deduction/substitution failed:
prog.cc:6:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
    6 |     x = std::min(x, 0);
      |                      ^
Exit Code:
1