Let\'s say I have the following piece of code (a simple CRTP class hierarchy). I want to typedef the base class type to save myself typing (in my actual code, I use the base
Enable C++11 only and use friend BaseType
You cannot use friend class on typedef in C++03.
An elaborated-type-specifier shall be used in a friend declaration for a class(101)
101) The class-key of the elaborated-type-specifier is required.
elaborated-type-specifier:
class-key ::opt nested-name-specifieropt identifier
class-key ::opt nested-name-specifieropt templateopt template-id
enum ::opt nested-name-specifieropt identifier
typename ::opt nested-name-specifier identifier
typename ::opt nested-name-specifier templateopt template-id