G ++ "not a type" error
4 answers
As you know, T :: size_type must have a prefix with the type name. Why?
From "C ++ Templates: The Complete Guide"
A language definition solves this problem by indicating that in the general case, a dependent qualified name does not indicate a type, unless that name has a prefix with the typename keyword.
... Type name prefix for name is required if name
- Appears in the template.
- Is qualified
- ,
, typename , .
+7