0

I can combine type alias with class definition like this:

using XX = struct AA { };

But how can I combine type alias with the definition of a full specialization?

template < typename... > struct BB;

using YY = template <> struct BB<int> { }; // error: expected type-specifier before ‘template’

Is there a nice workaround that would allow to escape a separate line using YY = BB<int>; after the definition of BB<int>?

Barry
  • 286,269
  • 29
  • 621
  • 977
Vahagn
  • 4,670
  • 9
  • 43
  • 72
  • 3
    What's wrong with the separate line? – Barry Feb 08 '17 at 15:49
  • @Barry I missed that the separate line can actually be **before** the definition of specialization. So by placing it before I achieved what I wanted. It is a macro like this: `DEFINE_OBJECT(name) using name = BB; template <> struct BB` – Vahagn Feb 08 '17 at 16:07

0 Answers0