Created
January 30, 2020 18:20
-
-
Save kylemanna/5fa64e08200d8aa0b8fac8e2d70e3f94 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 <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