Created
October 7, 2021 16:41
-
-
Save malfet/c83b9ebd35730ebf8bac7af42682ea37 to your computer and use it in GitHub Desktop.
Prints name of the template argument
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 <string> | |
template<typename T> | |
struct WhatsMyName { | |
WhatsMyName() { | |
std::cout << __PRETTY_FUNCTION__ << std::endl; | |
} | |
}; | |
WhatsMyName<std::string> _printer; | |
int main(void) { | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment