CMake/Tests/CompileFeatures/cxx_inline_namespaces.cpp

27 lines
280 B
C++
Raw Normal View History

2014-04-06 12:07:19 +04:00
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
}