diff options
Diffstat (limited to 'Tests/CompileFeatures/cxx_inline_namespaces.cpp')
-rw-r--r-- | Tests/CompileFeatures/cxx_inline_namespaces.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_inline_namespaces.cpp b/Tests/CompileFeatures/cxx_inline_namespaces.cpp new file mode 100644 index 0000000..59fa9c8 --- /dev/null +++ b/Tests/CompileFeatures/cxx_inline_namespaces.cpp @@ -0,0 +1,26 @@ +namespace Lib +{ +inline namespace Lib_1 +{ + template <typename T> class A; +} + +template <typename T> void g(T); +} + +struct MyClass { + +}; +namespace Lib +{ +template<> +class A<MyClass> { + +}; +} + +void someFunc() +{ + Lib::A<MyClass> a; + g(a); // ok, Lib is an associated namespace of A +} |