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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -