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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -