If a template declaration references a member of a dependent type, it is only possible to alert the user to the non-existence of this member during type instantiation for a given set of template arguments. For example:
template<class T> class foo { typename T::A x; // we expect that "A" is a member type }; struct bar { }; foo<bar> y;// error: "bar" has no member type named "A"
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|