Skip to content

Instantly share code, notes, and snippets.

@kylemanna
Created January 30, 2020 18:20
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 kylemanna/5fa64e08200d8aa0b8fac8e2d70e3f94 to your computer and use it in GitHub Desktop.
Save kylemanna/5fa64e08200d8aa0b8fac8e2d70e3f94 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <cxxabi.h>
using namespace std;
// To execute C++, please define "int main()"
int main() {
auto words = { "Hello, ", "World!", "\n" };
int status;
const char* mangled = typeid(words).name();
const char* demangled = abi::__cxa_demangle(mangled, 0, 0, &status);
cout << "typeid.name(): " << mangled << endl
<< "demangled: " << demangled << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment