In
C++11, the above code could be simplified to: import std; template struct HasTypedefFoobar : std::false_type {}; template struct HasTypedefFoobar> : std::true_type {}; struct Foo { using Foobar = float; }; int main() { std::println("{}", HasTypedefFoobar::value); std::println("{}", HasTypedefFoobar::value); return 0; } With the standardisation of the detection idiom in the Library fundamental v2 (n4562) proposal, the above code could be re-written as follows: import std; template using HasTypedefFoobarUnderlying = typename T::Foobar; struct Foo { using Foobar = float; }; int main() { std::println("{}", std::is_detected::value); std::println("{}", std::is_detected::value); return 0; } The developers of
Boost used SFINAE in boost::enable_if and in other ways. ==References==