compilation - C++11 constexpr and typeid(type) -
is there way, how typeid variable in compile time using constexpr?
this not working, since std::type_index has no constexpr ctor
constexpr std::type_index = typeid(double);
in way, there is:
constexpr const std::type_info &i = typeid(double); you have keep in mind typeid returns type const std::type_info &, not std::type_index.
Comments
Post a Comment