mardi 29 septembre 2015

C++11 constexpr and typeid(type)

Is there a way, how to get typeid into variable in compile time using constexpr?

This is not working, since std::type_index has no constexpr ctor

constexpr std::type_index i = typeid(double);

Aucun commentaire:

Enregistrer un commentaire