VC++ 2017 reports C2760 error with this code:
template <typename x>
struct y
{
static void z()
{
using def = typename x::d<0>;
}
};
struct some
{
template <int N> struct d;
};
// ... y<some> ...
Compiler output:
my.cpp(6): error C2760: syntax error: unexpected token '<', expected ';'
my.cpp(8): note: see reference to class template instantiation 'y<x>' being compiled
The question is how write def
definition inside of y::z
?