C++ - meaning of a statement combining typedef and typename
the typename
is saying that _Mybase::value_type
is the name of type so the typedef
can reley on that fact.
typedef is defining a new type for use in your code, like a shorthand.
typedef typename _MyBase::value_type value_type;
value_type v;
//use v
typename here is letting the compiler know that value_type
is a type and not a static member of _MyBase
.
the ::
is the scope of the type. It is kind of like "is in" so value_type
"is in" _MyBase
. or can also be thought of as contains.