I'm studying new features provided by C++11 and I found this std::remove_extent.
Given a array type it could return new type which remove one dimension from the given type.
typedef std::remove_extent<int[24]>::type A; //A is int
However I can't find a usage for this, aside from define a new type from existing type by remove dimension from given type.
Any one could suggest why C++11 introduce this feature? Is there any benefits of using this remove_extent?
Aucun commentaire:
Enregistrer un commentaire