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
This commit is contained in:
Douglas Gregor 2011-01-26 15:39:56 +00:00
parent aab015a929
commit 497ac97247

View File

@ -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