Author
anonymous
over 4 years ago
Language
C++
Compiler
gcc 9.3.0
Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-9.3.0/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:6:15: error: no matching function for call to 'function()'
6 | function ();
| ^
prog.cc:3:40: note: candidate: 'template<int Z> std::enable_if_t<(Z != 0)> function()'
3 | template <int Z=0> std::enable_if_t<Z> function () { }
| ^~~~~~~~
prog.cc:3:40: note: template argument deduction/substitution failed:
In file included from prog.cc:1:
/opt/wandbox/gcc-9.3.0/include/c++/9.3.0/type_traits: In substitution of 'template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = (0 != 0); _Tp = void]':
prog.cc:3:40: required by substitution of 'template<int Z> std::enable_if_t<(Z != 0)> function() [with int Z = 0]'
prog.cc:6:15: required from here
/opt/wandbox/gcc-9.3.0/include/c++/9.3.0/type_traits:2384:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2384 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
Exit Code:
1