diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-06 08:07:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-08 09:05:57 (GMT) |
commit | 300ce2481eae64f44ca4a4bec4f975db4f3e16c8 (patch) | |
tree | 8624b0a8eb8876245a17ebe84f86e6352a1bbedf /Tests/CompileFeatures | |
parent | f9d04a96b57ad5f68259b978983289043ae22716 (diff) | |
download | CMake-300ce2481eae64f44ca4a4bec4f975db4f3e16c8.zip CMake-300ce2481eae64f44ca4a4bec4f975db4f3e16c8.tar.gz CMake-300ce2481eae64f44ca4a4bec4f975db4f3e16c8.tar.bz2 |
Features: Add cxx_inline_namespaces.
Diffstat (limited to 'Tests/CompileFeatures')
-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 +} |