Created
June 17, 2014 12:15
-
-
Save vannell/58ef3d4d2bde4aa6e584 to your computer and use it in GitHub Desktop.
C++ Static initialization
This file contains hidden or 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
class A { | |
static T a; | |
static T initStaticA() { | |
T t; | |
//do some stuff on t | |
return t; | |
} | |
}; | |
T A::a = initStaticA(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment