Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Family1
- {
- struct ModelA{};
- struct ModelB{};
- };
- namespace Family2
- {
- struct ModelC{};
- };
- // valid for only classes in namespace Family1 only
- template<typename T>
- void Foo(T& _t ){}
- Family1::ModelA modelA;
- Family2::ModelC modelC;
- Foo<Family1::ModelA>( modelA ); // OK
- Foo<Family2::ModelC>( modelC ); // should cause a compile-time error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement