I am trying to create an alias for a simple std::vector
but g++ 5.1 doesn't like it. I understood that an alias is a substitute (more intelligent and strongly typed) for the old typedef
. Am I missing something? Below my code
using List = std::vector<int>;
using Ptr = List::iterator;
The error I have is
error: expected name specifier before 'List'
I am compiling with -std=c++0x flag.
Aucun commentaire:
Enregistrer un commentaire