Language
Compiler
Options
$
prog.cc:13:62: error: no type named 'type' in 'Traits<char>'
struct Traits<Wrapper<T>> { using type = typename Traits<T>::type; };
~~~~~~~~~~~~~~~~~~~~^~~~
prog.cc:13:51: note: in instantiation of template class 'Traits<Wrapper<char> >' requested here
struct Traits<Wrapper<T>> { using type = typename Traits<T>::type; };
^
prog.cc:15:44: note: in instantiation of template class 'Traits<Wrapper<Wrapper<char> > >' requested here
template<class T, typename Traits<T>::type = nullptr>
^
prog.cc:16:5: note: while substituting prior template arguments into non-type template parameter [with T = Wrapper<Wrapper<char> >]
int f( T ) { return 0; }
^~~~~~~~~~~~~~~~~~~~
prog.cc:21:5: note: while substituting deduced template arguments into function template 'f' [with T = Wrapper<Wrapper<char> >, $1 = (no value)]
f( Wrapper<Wrapper<char>>{} );
^
1 error generated.
Exit Code:
1