Quantcast
Channel: BlogoSfera » parameter?
Viewing all articles
Browse latest Browse all 12

SFINAE specialization: Why C++ compiler (or standard) does not allow template having one single parameter? [duplicate]

$
0
0

This question already has an answer here: std::enable_if to conditionally compile a member function 6 answers Example of a working SFINAE template specialization available on Coliru. #include <iostream> #include <typeinfo> #include <type_traits> template <typename T, typename = T> struct Foo { static void foo() { std::cout << "General " << typeid(T).name() << '\n'; } }; […]

The post SFINAE specialization: Why C++ compiler (or standard) does not allow template having one single parameter? [duplicate] appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 12

Trending Articles