Author
anonymous
almost 8 years ago
Language
Compiler
Options
Author
anonymous
almost 8 years ago
$ prog.cc:17:8: error: static_assert failed due to requirement '::std::is_same_v<bool, double>' "constructor argument type should match template parameter"
static_assert(::std::is_same_v<TT, T>, "constructor argument type should match template parameter");
^ ~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:28:24: note: in instantiation of function template specialization 'Validated<double>::Validated<bool>' requested here
Validated<double> bar{true}; // error!
^
prog.cc:17:8: error: static_assert failed due to requirement '::std::is_same_v<int, double>' "constructor argument type should match template parameter"
static_assert(::std::is_same_v<TT, T>, "constructor argument type should match template parameter");
^ ~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:29:24: note: in instantiation of function template specialization 'Validated<double>::Validated<int>' requested here
Validated<double> bar2(1); // error!
^
2 errors generated.
Exit Code:
1