[libcxx] r345561 - Unify definition of _LIBCPP_BEGIN/END_NAMESPACE_STD
Eric Fiselier
eric at efcs.ca
Mon Oct 29 19:02:00 PDT 2018
Author: ericwf
Date: Mon Oct 29 19:02:00 2018
New Revision: 345561
URL: http://llvm.org/viewvc/llvm-project?rev=345561&view=rev
Log:
Unify definition of _LIBCPP_BEGIN/END_NAMESPACE_STD
Modified:
libcxx/trunk/include/__config
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=345561&r1=345560&r2=345561&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Mon Oct 29 19:02:00 2018
@@ -463,12 +463,6 @@ typedef __char32_t char32_t;
#define _LIBCPP_IS_LITERAL(T) __is_literal(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_END_NAMESPACE_STD } }
-#define _VSTD std::_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
#endif
@@ -563,11 +557,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_
#endif // __GXX_EXPERIMENTAL_CXX0X__
-#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE {
-#define _LIBCPP_END_NAMESPACE_STD } }
-#define _VSTD std::_LIBCPP_NAMESPACE
-_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
-
#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__)
#define _LIBCPP_HAS_NO_ASAN
#endif
@@ -603,11 +592,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_
#define _ALIGNAS_TYPE(x) alignas(x)
#define _LIBCPP_HAS_NO_VARIADICS
-#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
-#define _LIBCPP_END_NAMESPACE_STD }
-#define _VSTD std
-_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
-
#define _LIBCPP_WEAK
#define _LIBCPP_HAS_NO_ASAN
@@ -635,11 +619,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_
#define __MULTILOCALE_API
#endif
-#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE {
-#define _LIBCPP_END_NAMESPACE_STD } }
-#define _VSTD std::_LIBCPP_NAMESPACE
-_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
-
#define _LIBCPP_HAS_NO_ASAN
#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__))
@@ -648,20 +627,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_
#endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM]
-#if _LIBCPP_STD_VER >= 17
-#define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM \
- _LIBCPP_BEGIN_NAMESPACE_STD inline namespace __fs { namespace filesystem {
-#else
-#define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM \
- _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
-#endif
-
-#define _LIBCPP_END_NAMESPACE_FILESYSTEM \
- _LIBCPP_END_NAMESPACE_STD } }
-
-#define _VSTD_FS _VSTD::__fs::filesystem
-
-
#if defined(_LIBCPP_OBJECT_FORMAT_COFF)
#ifdef _DLL
@@ -825,6 +790,25 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_
// Just so we can migrate to the new macros gradually.
#define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+// Inline namespaces are available in Clang/GCC/MSVC regardless of C++ dialect.
+#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_NAMESPACE {
+#define _LIBCPP_END_NAMESPACE_STD } }
+#define _VSTD std::_LIBCPP_NAMESPACE
+_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 17
+#define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM \
+ _LIBCPP_BEGIN_NAMESPACE_STD inline namespace __fs { namespace filesystem {
+#else
+#define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM \
+ _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
+#endif
+
+#define _LIBCPP_END_NAMESPACE_FILESYSTEM \
+ _LIBCPP_END_NAMESPACE_STD } }
+
+#define _VSTD_FS _VSTD::__fs::filesystem
+
#ifndef _LIBCPP_PREFERRED_OVERLOAD
# if __has_attribute(__enable_if__)
# define _LIBCPP_PREFERRED_OVERLOAD __attribute__ ((__enable_if__(true, "")))
More information about the libcxx-commits
mailing list