lundi 29 mai 2017

Unqualified-id before 'using'

I want to define the following alias into the namespace Library:

namespace Library
{
    template <typename T>
    using MyVector = std::vector<T, std::allocator<T> >;
}

but I get the following error from the compiler:

expected unqualified-id before 'using'

I'm following the official reference on cppreference.com but so far I couldn't make it work. What am I missing?

Aucun commentaire:

Enregistrer un commentaire