Skip to content

Commit

Permalink
[libc++][C++03] Use __cxx03/ headers in C++03 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
philnik777 committed Dec 9, 2024
1 parent bf624c9 commit 055ae1f
Show file tree
Hide file tree
Showing 130 changed files with 6,997 additions and 6,361 deletions.
1 change: 1 addition & 0 deletions .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
fail-fast: false
matrix:
config: [
'cxx03-main-headers',
'generic-cxx03',
'generic-cxx26',
'generic-modules'
Expand Down
2 changes: 2 additions & 0 deletions libcxx/cmake/caches/cxx03-headers.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(LIBCXX_TEST_PARAMS "std=c++03;test-cxx03-headers=True" CACHE STRING "")
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
5 changes: 0 additions & 5 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define _LIBCPP_TOSTRING2(x) #x
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)

// NOLINTNEXTLINE(libcpp-cpp-version-check)
# if __cplusplus < 201103L
# define _LIBCPP_CXX03_LANG
# endif

# ifndef __has_constexpr_builtin
# define __has_constexpr_builtin(x) 0
# endif
Expand Down
5 changes: 5 additions & 0 deletions libcxx/include/__configuration/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
# pragma GCC system_header
#endif

// NOLINTNEXTLINE(libcpp-cpp-version-check)
# if __cplusplus < 201103L
# define _LIBCPP_CXX03_LANG
# endif

// NOLINTBEGIN(libcpp-cpp-version-check)
#ifdef __cplusplus
# if __cplusplus <= 201103L
Expand Down
5 changes: 0 additions & 5 deletions libcxx/include/__cxx03/__config
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define _LIBCPP_TOSTRING2(x) #x
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)

// NOLINTNEXTLINE(libcpp-cpp-version-check)
# if __cplusplus < 201103L
# define _LIBCPP_CXX03_LANG
# endif

# ifndef __has_constexpr_builtin
# define __has_constexpr_builtin(x) 0
# endif
Expand Down
4 changes: 0 additions & 4 deletions libcxx/include/__flat_map/sorted_unique.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

#include <__config>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif

#if _LIBCPP_STD_VER >= 23

_LIBCPP_BEGIN_NAMESPACE_STD
Expand Down
Loading

0 comments on commit 055ae1f

Please sign in to comment.