Is there any way how to get typeidin a variable at compile time using constexpr?
typeid
This does not work because it std::type_indexdoes not have constexpr ctor
std::type_index
constexpr std::type_index i = typeid(double);
In a sense, there are:
constexpr const std::type_info &i = typeid(double);
You must remember that typeidtype returns const std::type_info &, not std::type_index.
const std::type_info &
Source: https://habr.com/ru/post/1609569/More articles:install the ATS keys in the extension file. - iosHow to interpret the result of the format (n, 'c') outside of ASCII? - pythonRunning gradle -v returns "JAVA_HOME installed to an invalid directory", although I have a valid JAVA_HOME - javaWhere to integrate PayU payment gateway - androidUnsigned integer literal sign with a negative sign - c #Какова наилучшая практика в отношении предупреждения безопасности в Google Play Store? - android-securityHow to display shadow for NSView? - cocoaPHP 5.5: доступ к статическому члену класса динамического класса, хранящегося в объекте - variablesHTML parser for creating formatted GTFS data - androidAccessing iOS device camera stream using web application - iosAll Articles