Skip to content

Instantly share code, notes, and snippets.

@hatsusato
Last active November 30, 2016 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hatsusato/8da16ee776fd2425a6691a1fdd80c9a1 to your computer and use it in GitHub Desktop.
Save hatsusato/8da16ee776fd2425a6691a1fdd80c9a1 to your computer and use it in GitHub Desktop.
Show exact type infomation.
#include <boost/type_index.hpp>
#include <iostream>
#define SHOW_TYPE(x) boost::typeindex::type_id_with_cvr<decltype(x)>().pretty_name()
int main() {
std::cout << SHOW_TYPE(main) << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment