[libcxx] r344642 - [libcxx] Avoid repeating the definition of std:: namespaces
Louis Dionne
ldionne at apple.com
Tue Oct 16 13:02:59 PDT 2018
Author: ldionne
Date: Tue Oct 16 13:02:59 2018
New Revision: 344642
URL: http://llvm.org/viewvc/llvm-project?rev=344642&view=rev
Log:
[libcxx] Avoid repeating the definition of std:: namespaces
This reduces code duplication a tiny bit.
Modified:
libcxx/trunk/include/__config
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=344642&r1=344641&r2=344642&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue Oct 16 13:02:59 2018
@@ -464,14 +464,10 @@ typedef __char32_t char32_t;
#endif
// Inline namespaces are available in Clang regardless of C++ dialect.
-#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
+#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE {
#define _LIBCPP_END_NAMESPACE_STD } }
#define _VSTD std::_LIBCPP_NAMESPACE
-
-namespace std {
- inline namespace _LIBCPP_NAMESPACE {
- }
-}
+_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer)
#define _LIBCPP_HAS_NO_ASAN
@@ -570,11 +566,7 @@ namespace std {
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE {
#define _LIBCPP_END_NAMESPACE_STD } }
#define _VSTD std::_LIBCPP_NAMESPACE
-
-namespace std {
- inline namespace _LIBCPP_NAMESPACE {
- }
-}
+_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
#define _LIBCPP_HAS_NO_ASAN
@@ -614,9 +606,7 @@ namespace std {
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
#define _LIBCPP_END_NAMESPACE_STD }
#define _VSTD std
-
-namespace std {
-}
+_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
#define _LIBCPP_WEAK
@@ -645,14 +635,10 @@ namespace std {
#define __MULTILOCALE_API
#endif
-#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
+#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE {
#define _LIBCPP_END_NAMESPACE_STD } }
#define _VSTD std::_LIBCPP_NAMESPACE
-
-namespace std {
- inline namespace _LIBCPP_NAMESPACE {
- }
-}
+_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
#define _LIBCPP_HAS_NO_ASAN
More information about the libcxx-commits
mailing list