CPP : typeid.name and initializer_list
typeid.name The function typeid.name can give us the information about variable. Header file: typeinfo #include <typeinfo> int main() { vector<bool> vec{ false, true }; auto ans = vec[0]; cout << typeid(ans).name() << endl; bool tmp = false; cout << typeid(tmp).name() << endl; int value = 12; cout << typeid(value).name() << Read more…