1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
struct Outer { Outer() {} template <class T> struct Inner {}; }; namespace NS { namespace { template <typename T> struct Struct {}; template <typename T> struct Union {}; } // namespace } // namespace NS int main() { Outer::Inner<int> oi; NS::Struct<int> ns_struct; NS::Union<int> ns_union; }