Skip to content

Instantly share code, notes, and snippets.

@Cylix
Created October 19, 2020 05:25
Show Gist options
  • Save Cylix/d7aad54597570340d3d72f5799ec68bd to your computer and use it in GitHub Desktop.
Save Cylix/d7aad54597570340d3d72f5799ec68bd to your computer and use it in GitHub Desktop.
Reflection in C++14 - Static Variables Exemple #2
#include <iostream>
class A {
public:
A(void) { std::cout << "A::A()" << std::endl; }
};
static A a;
int main(void) {
std::cout << "main()" << std::endl;
return 0;
}
// Program Output:
// A::A()
// main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment