Content deleted Content added
→Example: Changed call argument from 0 to nullptr as it is a pointer. Tags: Mobile edit Mobile web edit |
→Example: Fixing consitency |
||
Line 45:
static no& test(...);
// If the "sizeof" of the result of calling test<T>(
// the first overload worked and T has a nested type named foobar.
static const bool value = sizeof(test<T>(nullptr)) == sizeof(yes);
Line 61:
</source>
When <code>T</code> has the nested type <code>foobar</code> defined, the instantiation of the first <code>test</code> works and
The developers of [[Boost C++ Libraries|Boost]] used SFINAE in boost::enable_if<ref name="enable_if">[http://www.boost.org/doc/libs/release/libs/utility/enable_if.html Boost Enable If]</ref> and in other ways.
|