I've got a few templates based on compile time constants, like this:
const int SIG0 = 0;
template<int Sig>
struct SignalPrototype;
template<>
struct SignalPrototype<SIG0> {
typedef std::function< void() > type;
};
When I tried to transform it into the C++11 (I believe) Alias Declarations, I couldn't get it to work in any shape or form (posting just one of them):
const int SIG0 = 0;
template<int Sig>
using SignalPrototype = std::function< void() >;
template<>
using SignalPrototype<SIG0> = std::function< void() >;
With the error: expected unqualified-id before ‘using’
I guess it is expecting something in the template parameters, but I can't put SIG0
as it is not a type.
Notes: I'm using C++ standard up to C++17, so anything newer that I don't know about is appreciated too.
Also, I don't like the 'these' in the title, but I have no idea what is their specific name.