Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#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