,
template <Type value, class Y, ...>
...fn-or-class...
#define FN_OR_CLASS(VALUE, TYPE_Y, ...) \
...fn-or-class...
, /, , . #defines , , , , , .
, , . , , , , , . , - - , API- , , - ... . , ++ 0x Concepts: , - , , API .
template <class T>
struct X
{
void f() { }
void g() { T::whatever(); } // only error if g() called w/o T::whatever
};
int main()
{
X<int> x;
x.f();
// x.g(); // would cause an error as int::whatever() doesn't exist...
}
SFINAE ( ), . , , " - fn (int)?".