RAD Studio
ContentsIndex
PreviousUpNext
E2405: Dependent template reference 'identifier' yields non-template symbol (C++)

If a template specialization reference within a template declaration yields a reference to a non-template during type instantiation, the above error will result. For example:

template<class T>
class foo
{
typename T::template A<int> x;  // "A" must be a member template
};
struct bar {
struct A { };
};
foo<bar> y;// error: bar::A is a non-template class!
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!