From 497ac97247791e251d94c85602ae44d2ededadc4 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 26 Jan 2011 15:39:56 +0000 Subject: [PATCH] Inline namespaces are always available in Clang. Rely on that without testing via __has_feature, since __has_feature for C++0x features no longer evaluates true in C++98/03 mode. Also, eliminate the redundant using directive. Inline namespaces make their members visible in the enclosing namespace automatically. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124293 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__config | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/include/__config b/include/__config index 2b590cc8..adce0a6d 100644 --- a/include/__config +++ b/include/__config @@ -148,22 +148,15 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_TRAILING_RETURN #endif -#if __has_feature(cxx_inline_namespaces) +// Inline namespaces are available in Clang regardless of C++ dialect. #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { #define _LIBCPP_END_NAMESPACE_STD } } #define _STD std::_LIBCPP_NAMESPACE namespace std { -inline namespace _LIBCPP_NAMESPACE { + inline namespace _LIBCPP_NAMESPACE { + } } -using namespace _LIBCPP_NAMESPACE; -} - -#else // __has_feature(cxx_inline_namespaces) -#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { -#define _LIBCPP_END_NAMESPACE_STD } -#define _STD std -#endif // __has_feature(cxx_inline_namespaces) #if !(__has_feature(cxx_constexpr)) #define _LIBCPP_HAS_NO_CONSTEXPR