Skip to content

Instantly share code, notes, and snippets.

@usagi
Last active December 11, 2015 01:38
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 usagi/4524388 to your computer and use it in GitHub Desktop.
Save usagi/4524388 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <boost/units/detail/utility.hpp>
#include <vector>
#include <string>
template<class T, class ... TS>
struct X { };
int main(){
using namespace std;
int a;
string b;
vector<uint_fast8_t> c;
X<int, float, double, unsigned, bool, nullptr_t> d;
auto e = main;
{
using boost::units::detail::demangle;
cout
#define A(x) typeid(x).name()
#define B(x) demangle(A(x))
#define C(x) << A(x) << " --> " << B(x) << "\n"
C(a)
C(b)
C(c)
C(d)
C(e)
#undef C
#undef B
#undef A
<< flush
;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment