Last active
December 11, 2015 01:38
-
-
Save usagi/4524388 to your computer and use it in GitHub Desktop.
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/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