Created
May 26, 2014 11:54
-
-
Save anonymous/f1f2246d04a935794e44 to your computer and use it in GitHub Desktop.
typename usage
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
template <class T1> | |
struct OuterStruct | |
{ | |
T1 mValue; | |
struct InnerStruct | |
{ | |
T1 mValue; | |
}; | |
}; | |
template <class T2> | |
struct InnerStruct_Wrapper | |
{ | |
OuterStruct<T2>::InnerStruct mUsingInner; | |
}; | |
int main(int argc, char* argv[]) | |
{ | |
InnerStruct_Wrapper<int> wrapper; | |
OuterStruct<int>::InnerStruct innerStrct; | |
innerStrct.mValue = std::numeric_limits<int>::max(); | |
wrapper.mUsingInner = innerStrct; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment