Skip to content

Commit b128fbe

Browse files
committed
[libc++][C++03] Use __cxx03/ headers in C++03 mode
1 parent bea0f2b commit b128fbe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+7084
-6361
lines changed

.github/workflows/libcxx-build-and-test.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
fail-fast: false
4444
matrix:
4545
config: [
46+
'frozen-cxx03-headers',
4647
'generic-cxx03',
4748
'generic-cxx26',
4849
'generic-modules'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set(LIBCXX_TEST_PARAMS "std=c++03;test_frozen_cxx03_headers=True" CACHE STRING "")
2+
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")

libcxx/include/__config

-5
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
152152
# define _LIBCPP_TOSTRING2(x) #x
153153
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
154154

155-
// NOLINTNEXTLINE(libcpp-cpp-version-check)
156-
# if __cplusplus < 201103L
157-
# define _LIBCPP_CXX03_LANG
158-
# endif
159-
160155
# ifndef __has_constexpr_builtin
161156
# define __has_constexpr_builtin(x) 0
162157
# endif

libcxx/include/__configuration/language.h

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
// NOLINTBEGIN(libcpp-cpp-version-check)
2020
#ifdef __cplusplus
21+
# if __cplusplus < 201103L
22+
# define _LIBCPP_CXX03_LANG
23+
# endif
24+
2125
# if __cplusplus <= 201103L
2226
# define _LIBCPP_STD_VER 11
2327
# elif __cplusplus <= 201402L

libcxx/include/__cxx03/__config

-5
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
157157
# define _LIBCPP_TOSTRING2(x) #x
158158
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
159159

160-
// NOLINTNEXTLINE(libcpp-cpp-version-check)
161-
# if __cplusplus < 201103L
162-
# define _LIBCPP_CXX03_LANG
163-
# endif
164-
165160
# ifndef __has_constexpr_builtin
166161
# define __has_constexpr_builtin(x) 0
167162
# endif

libcxx/include/__flat_map/sorted_unique.h

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212
#include <__config>
1313

14-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15-
# pragma GCC system_header
16-
#endif
17-
1814
#if _LIBCPP_STD_VER >= 23
1915

2016
_LIBCPP_BEGIN_NAMESPACE_STD

0 commit comments

Comments
 (0)