Skip to content

Commit 17185fc

Browse files
committed
[libc++] Remove the inline namespace for std::filesystem in ABIv2
1 parent 42ba740 commit 17185fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libcxx/include/__config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@
166166
// requires code not to make these assumptions.
167167
# define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_ARRAY
168168
# define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_STRING_VIEW
169+
// Dont' add an inline namespace for `std::filesystem`
170+
# define _LIBCPP_ABI_NO_FILESYSTEM_INLINE_NAMESPACE
169171
# elif _LIBCPP_ABI_VERSION == 1
170172
# if !(defined(_LIBCPP_OBJECT_FORMAT_COFF) || defined(_LIBCPP_OBJECT_FORMAT_XCOFF))
171173
// Enable compiling copies of now inline methods into the dylib to support
@@ -831,10 +833,16 @@ typedef __char32_t char32_t;
831833
inline namespace _LIBCPP_ABI_NAMESPACE {
832834
# define _LIBCPP_END_NAMESPACE_STD }} _LIBCPP_POP_EXTENSION_DIAGNOSTICS
833835

836+
#ifdef _LIBCPP_ABI_NO_FILESYSTEM_INLINE_NAMESPACE
837+
# define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM _LIBCPP_BEGIN_NAMESPACE_STD namespace filesystem {
838+
# define _LIBCPP_END_NAMESPACE_FILESYSTEM } _LIBCPP_END_NAMESPACE_STD
839+
#else
834840
# define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM _LIBCPP_BEGIN_NAMESPACE_STD \
835841
inline namespace __fs { namespace filesystem {
836842

837843
# define _LIBCPP_END_NAMESPACE_FILESYSTEM }} _LIBCPP_END_NAMESPACE_STD
844+
#endif
845+
838846
// clang-format on
839847

840848
# if __has_attribute(__enable_if__)

0 commit comments

Comments
 (0)