Last active
July 16, 2018 00:21
-
-
Save jingzhehu/acaa8d2aacee85deb93289693202bc2d to your computer and use it in GitHub Desktop.
Print type with boost:type_index #c++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/type_index.hpp> | |
#define PRINT_TYPE(param) std::cout << boost::typeindex::type_id_with_cvr<decltype(param)>().pretty_name() << std::endl; | |
#define PRINT_TYPE_T(T) std::cout << "param type is: " << boost::typeindex::type_id_with_cvr<T>().pretty_name() << std::endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment