Skip to content

Instantly share code, notes, and snippets.

@mikeplavsky
Last active September 14, 2020 14:29
Show Gist options
  • Save mikeplavsky/85f1dd8ef98be5ab21c26c9526cf13c8 to your computer and use it in GitHub Desktop.
Save mikeplavsky/85f1dd8ef98be5ab21c26c9526cf13c8 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <typeinfo>
using namespace std;
struct Tag {
string name = "Test";
};
void check(Tag && t) {
cout << t.name
<< " "
<< typeid(t).name()
<< std::endl;
}
int main()
{
Tag t;
check(t);
}
@mikeplavsky
Copy link
Author

mikeplavsky commented Aug 29, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment