Reputation: 325
enum ByteOrder_e
{
MM,
II,
};
template<ByteOrder_e O>
struct ByteOrder_s
{
enum Version_e
{
Small,
Big
};
template<Version_e V>
struct Version_s
{
};
};
template<ByteOrder_e O, typename ByteOrder_s<O>::Version_e V>
void Open()
{
using Version = typename ByteOrder_s<O>::Version_s<V>; //MSVC considers this line to be wrong
}
ConsoleApplication1.cpp(22,52): error C2760: syntax error: '<' was unexpected here; expected ';' ConsoleApplication1.cpp(22,55): error C2760: syntax error: ';' was unexpected here; expected 'expression'
Upvotes: 0
Views: 48
Reputation: 42736
Indicates that Version_s
is a class template by introducing the template
keyword:
using Version = typename ByteOrder_s<O>::template Version_s<V>;
// ^^^^^^^^^^
Upvotes: 1