aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/__algorithm/find.h6
-rw-r--r--libcxx/include/__algorithm/lexicographical_compare.h6
-rw-r--r--libcxx/include/__algorithm/sort.h4
-rw-r--r--libcxx/include/__atomic/aliases.h2
-rw-r--r--libcxx/include/__atomic/atomic_sync.h6
-rw-r--r--libcxx/include/__atomic/cxx_atomic_impl.h4
-rw-r--r--libcxx/include/__chrono/convert_to_tm.h3
-rw-r--r--libcxx/include/__chrono/formatter.h24
-rw-r--r--libcxx/include/__chrono/high_resolution_clock.h2
-rw-r--r--libcxx/include/__chrono/ostream.h8
-rw-r--r--libcxx/include/__chrono/parser_std_format_spec.h4
-rw-r--r--libcxx/include/__chrono/statically_widen.h6
-rw-r--r--libcxx/include/__chrono/steady_clock.h2
-rw-r--r--libcxx/include/__chrono/time_zone.h7
-rw-r--r--libcxx/include/__chrono/time_zone_link.h6
-rw-r--r--libcxx/include/__chrono/tzdb.h7
-rw-r--r--libcxx/include/__chrono/tzdb_list.h7
-rw-r--r--libcxx/include/__chrono/zoned_time.h7
-rw-r--r--libcxx/include/__condition_variable/condition_variable.h8
-rw-r--r--libcxx/include/__config61
-rw-r--r--libcxx/include/__config_site.in35
-rw-r--r--libcxx/include/__configuration/abi.h8
-rw-r--r--libcxx/include/__configuration/availability.h12
-rw-r--r--libcxx/include/__filesystem/directory_entry.h4
-rw-r--r--libcxx/include/__filesystem/directory_iterator.h4
-rw-r--r--libcxx/include/__filesystem/operations.h4
-rw-r--r--libcxx/include/__filesystem/path.h28
-rw-r--r--libcxx/include/__filesystem/recursive_directory_iterator.h4
-rw-r--r--libcxx/include/__format/concepts.h2
-rw-r--r--libcxx/include/__format/format_arg_store.h4
-rw-r--r--libcxx/include/__format/format_context.h16
-rw-r--r--libcxx/include/__format/format_functions.h38
-rw-r--r--libcxx/include/__format/format_parse_context.h2
-rw-r--r--libcxx/include/__format/formatter_bool.h2
-rw-r--r--libcxx/include/__format/formatter_char.h8
-rw-r--r--libcxx/include/__format/formatter_floating_point.h8
-rw-r--r--libcxx/include/__format/formatter_integral.h8
-rw-r--r--libcxx/include/__format/formatter_output.h13
-rw-r--r--libcxx/include/__format/formatter_string.h4
-rw-r--r--libcxx/include/__format/parser_std_format_spec.h24
-rw-r--r--libcxx/include/__format/unicode.h12
-rw-r--r--libcxx/include/__format/write_escaped.h5
-rw-r--r--libcxx/include/__functional/hash.h4
-rw-r--r--libcxx/include/__fwd/fstream.h2
-rw-r--r--libcxx/include/__fwd/ios.h2
-rw-r--r--libcxx/include/__fwd/istream.h2
-rw-r--r--libcxx/include/__fwd/ostream.h2
-rw-r--r--libcxx/include/__fwd/sstream.h2
-rw-r--r--libcxx/include/__fwd/streambuf.h2
-rw-r--r--libcxx/include/__fwd/string.h10
-rw-r--r--libcxx/include/__fwd/string_view.h4
-rw-r--r--libcxx/include/__locale28
-rw-r--r--libcxx/include/__locale_dir/locale_base_api.h2
-rw-r--r--libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h8
-rw-r--r--libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h8
-rw-r--r--libcxx/include/__mbstate_t.h4
-rw-r--r--libcxx/include/__memory/shared_ptr.h12
-rw-r--r--libcxx/include/__memory_resource/synchronized_pool_resource.h8
-rw-r--r--libcxx/include/__mutex/mutex.h4
-rw-r--r--libcxx/include/__ostream/basic_ostream.h10
-rw-r--r--libcxx/include/__ostream/print.h22
-rw-r--r--libcxx/include/__random/random_device.h4
-rw-r--r--libcxx/include/__ranges/istream_view.h2
-rw-r--r--libcxx/include/__stop_token/atomic_unique_lock.h2
-rw-r--r--libcxx/include/__stop_token/stop_callback.h4
-rw-r--r--libcxx/include/__stop_token/stop_source.h4
-rw-r--r--libcxx/include/__stop_token/stop_state.h4
-rw-r--r--libcxx/include/__stop_token/stop_token.h4
-rw-r--r--libcxx/include/__string/char_traits.h6
-rw-r--r--libcxx/include/__support/xlocale/__posix_l_fallback.h10
-rw-r--r--libcxx/include/__support/xlocale/__strtonum_fallback.h2
-rw-r--r--libcxx/include/__thread/formatter.h4
-rw-r--r--libcxx/include/__thread/id.h4
-rw-r--r--libcxx/include/__thread/jthread.h4
-rw-r--r--libcxx/include/__thread/support.h12
-rw-r--r--libcxx/include/__thread/this_thread.h4
-rw-r--r--libcxx/include/__thread/thread.h10
-rw-r--r--libcxx/include/__thread/timed_backoff_policy.h4
-rw-r--r--libcxx/include/__type_traits/is_integral.h2
-rw-r--r--libcxx/include/__vector/vector.h2
-rw-r--r--libcxx/include/barrier4
-rw-r--r--libcxx/include/chrono7
-rw-r--r--libcxx/include/codecvt12
-rw-r--r--libcxx/include/complex6
-rw-r--r--libcxx/include/condition_variable4
-rw-r--r--libcxx/include/cstdlib2
-rw-r--r--libcxx/include/deque2
-rw-r--r--libcxx/include/format2
-rw-r--r--libcxx/include/fstream4
-rw-r--r--libcxx/include/future4
-rw-r--r--libcxx/include/iomanip4
-rw-r--r--libcxx/include/ios8
-rw-r--r--libcxx/include/iosfwd6
-rw-r--r--libcxx/include/iostream2
-rw-r--r--libcxx/include/istream6
-rw-r--r--libcxx/include/latch4
-rw-r--r--libcxx/include/list2
-rw-r--r--libcxx/include/locale42
-rw-r--r--libcxx/include/mutex4
-rw-r--r--libcxx/include/ostream4
-rw-r--r--libcxx/include/print42
-rw-r--r--libcxx/include/ranges2
-rw-r--r--libcxx/include/regex34
-rw-r--r--libcxx/include/semaphore4
-rw-r--r--libcxx/include/shared_mutex4
-rw-r--r--libcxx/include/sstream4
-rw-r--r--libcxx/include/stdatomic.h2
-rw-r--r--libcxx/include/stop_token4
-rw-r--r--libcxx/include/streambuf6
-rw-r--r--libcxx/include/string32
-rw-r--r--libcxx/include/string_view4
-rw-r--r--libcxx/include/syncstream20
-rw-r--r--libcxx/include/thread4
-rw-r--r--libcxx/include/vector2
-rw-r--r--libcxx/include/version20
-rw-r--r--libcxx/include/wchar.h4
116 files changed, 479 insertions, 487 deletions
diff --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h
index 6f23ec3..14b8a78 100644
--- a/libcxx/include/__algorithm/find.h
+++ b/libcxx/include/__algorithm/find.h
@@ -29,7 +29,7 @@
#include <__utility/move.h>
#include <limits>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <cwchar>
#endif
@@ -65,7 +65,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _T
return __last;
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _Tp,
class _Up,
class _Proj,
@@ -77,7 +77,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _T
return __ret;
return __last;
}
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
// TODO: This should also be possible to get right with different signedness
// cast integral types to allow vectorization
diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index 1de3ca1..ebe7e3b 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -26,7 +26,7 @@
#include <__type_traits/is_trivially_lexicographically_comparable.h>
#include <__type_traits/is_volatile.h>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <cwchar>
#endif
@@ -78,14 +78,14 @@ __lexicographical_compare(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Tp* __las
return __last1 - __first1 < __last2 - __first2;
return __res < 0;
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
else if constexpr (is_same<__remove_cv_t<_Tp>, wchar_t>::value) {
auto __res = std::__constexpr_wmemcmp(__first1, __first2, std::min(__last1 - __first1, __last2 - __first2));
if (__res == 0)
return __last1 - __first1 < __last2 - __first2;
return __res < 0;
}
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
else {
auto __res = std::mismatch(__first1, __last1, __first2, __last2);
if (__res.second == __last2)
diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h
index 39868b8..ed828b6 100644
--- a/libcxx/include/__algorithm/sort.h
+++ b/libcxx/include/__algorithm/sort.h
@@ -851,7 +851,7 @@ template <class _Comp, class _RandomAccessIterator>
void __sort(_RandomAccessIterator, _RandomAccessIterator, _Comp);
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
#endif
extern template _LIBCPP_EXPORTED_FROM_ABI void
@@ -896,7 +896,7 @@ template <class _Type>
using __sort_is_specialized_in_library = __is_any_of<
_Type,
char,
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
wchar_t,
#endif
signed char,
diff --git a/libcxx/include/__atomic/aliases.h b/libcxx/include/__atomic/aliases.h
index 3c84747..37d11dd 100644
--- a/libcxx/include/__atomic/aliases.h
+++ b/libcxx/include/__atomic/aliases.h
@@ -43,7 +43,7 @@ using atomic_char8_t = atomic<char8_t>;
#endif
using atomic_char16_t = atomic<char16_t>;
using atomic_char32_t = atomic<char32_t>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using atomic_wchar_t = atomic<wchar_t>;
#endif
diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h
index aaf81f5..08f3497 100644
--- a/libcxx/include/__atomic/atomic_sync.h
+++ b/libcxx/include/__atomic/atomic_sync.h
@@ -69,7 +69,7 @@ struct __atomic_wait_poll_impl {
}
};
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT;
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT;
@@ -163,7 +163,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _
std::__cxx_atomic_notify_all(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a));
}
-#else // _LIBCPP_HAS_NO_THREADS
+#else // _LIBCPP_HAS_THREADS
template <class _AtomicWaitable, class _Poll>
_LIBCPP_HIDE_FROM_ABI void __atomic_wait_unless(const _AtomicWaitable& __a, _Poll&& __poll, memory_order __order) {
@@ -177,7 +177,7 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable&) {}
template <class _AtomicWaitable>
_LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable&) {}
-#endif // _LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
template <typename _Tp>
_LIBCPP_HIDE_FROM_ABI bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp const& __rhs) {
diff --git a/libcxx/include/__atomic/cxx_atomic_impl.h b/libcxx/include/__atomic/cxx_atomic_impl.h
index 86a57d1..acffb0f 100644
--- a/libcxx/include/__atomic/cxx_atomic_impl.h
+++ b/libcxx/include/__atomic/cxx_atomic_impl.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)
+#if _LIBCPP_HAS_GCC_ATOMIC_IMP
// [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
// the default operator= in an object is not volatile, a byte-by-byte copy
@@ -260,7 +260,7 @@ __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern, memory_o
# define __cxx_atomic_is_lock_free(__s) __atomic_is_lock_free(__s, 0)
-#elif defined(_LIBCPP_HAS_C_ATOMIC_IMP)
+#elif _LIBCPP_HAS_C_ATOMIC_IMP
template <typename _Tp>
struct __cxx_atomic_base_impl {
diff --git a/libcxx/include/__chrono/convert_to_tm.h b/libcxx/include/__chrono/convert_to_tm.h
index 3a51019..5f1b263 100644
--- a/libcxx/include/__chrono/convert_to_tm.h
+++ b/libcxx/include/__chrono/convert_to_tm.h
@@ -180,8 +180,7 @@ _LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(const _ChronoT& __value) {
// Has no time information.
} else if constexpr (same_as<_ChronoT, chrono::local_info>) {
// Has no time information.
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
} else if constexpr (__is_specialization_v<_ChronoT, chrono::zoned_time>) {
return std::__convert_to_tm<_Tm>(
chrono::sys_time<typename _ChronoT::duration>{__value.get_local_time().time_since_epoch()});
diff --git a/libcxx/include/__chrono/formatter.h b/libcxx/include/__chrono/formatter.h
index 8389e2c..c1b5720 100644
--- a/libcxx/include/__chrono/formatter.h
+++ b/libcxx/include/__chrono/formatter.h
@@ -12,7 +12,7 @@
#include <__config>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__algorithm/ranges_copy.h>
# include <__chrono/calendar.h>
@@ -143,8 +143,7 @@ __format_sub_seconds(basic_stringstream<_CharT>& __sstr, const chrono::hh_mm_ss<
__value.fractional_width);
}
-# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && \
- !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
template <class _CharT, class _Duration, class _TimeZonePtr>
_LIBCPP_HIDE_FROM_ABI void
__format_sub_seconds(basic_stringstream<_CharT>& __sstr, const chrono::zoned_time<_Duration, _TimeZonePtr>& __value) {
@@ -156,8 +155,7 @@ template <class _Tp>
consteval bool __use_fraction() {
if constexpr (__is_time_point<_Tp>)
return chrono::hh_mm_ss<typename _Tp::duration>::fractional_width;
-# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && \
- !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
return chrono::hh_mm_ss<typename _Tp::duration>::fractional_width;
# endif
@@ -232,7 +230,7 @@ _LIBCPP_HIDE_FROM_ABI __time_zone __convert_to_time_zone([[maybe_unused]] const
# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
if constexpr (same_as<_Tp, chrono::sys_info>)
return {__value.abbrev, __value.offset};
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
return __formatter::__convert_to_time_zone(__value.get_info());
# endif
@@ -450,7 +448,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __weekday_ok(const _Tp& __value) {
return true;
else if constexpr (same_as<_Tp, chrono::local_info>)
return true;
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
return true;
# endif
@@ -500,7 +498,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __weekday_name_ok(const _Tp& __value) {
return true;
else if constexpr (same_as<_Tp, chrono::local_info>)
return true;
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
return true;
# endif
@@ -550,7 +548,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __date_ok(const _Tp& __value) {
return true;
else if constexpr (same_as<_Tp, chrono::local_info>)
return true;
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
return true;
# endif
@@ -600,7 +598,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __month_name_ok(const _Tp& __value) {
return true;
else if constexpr (same_as<_Tp, chrono::local_info>)
return true;
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
return true;
# endif
@@ -964,7 +962,7 @@ public:
return _Base::__parse(__ctx, __format_spec::__fields_chrono, __format_spec::__flags{});
}
};
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
// Note due to how libc++'s formatters are implemented there is no need to add
// the exposition only local-time-format-t abstraction.
template <class _Duration, class _TimeZonePtr, __fmt_char_type _CharT>
@@ -977,13 +975,13 @@ public:
return _Base::__parse(__ctx, __format_spec::__fields_chrono, __format_spec::__flags::__clock);
}
};
-# endif // !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
# endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
# endif // if _LIBCPP_STD_VER >= 20
_LIBCPP_END_NAMESPACE_STD
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP___CHRONO_FORMATTER_H
diff --git a/libcxx/include/__chrono/high_resolution_clock.h b/libcxx/include/__chrono/high_resolution_clock.h
index 0697fd2..d324c7f 100644
--- a/libcxx/include/__chrono/high_resolution_clock.h
+++ b/libcxx/include/__chrono/high_resolution_clock.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono {
-#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
+#if _LIBCPP_HAS_MONOTONIC_CLOCK
typedef steady_clock high_resolution_clock;
#else
typedef system_clock high_resolution_clock;
diff --git a/libcxx/include/__chrono/ostream.h b/libcxx/include/__chrono/ostream.h
index 3420fb1..ca6d160 100644
--- a/libcxx/include/__chrono/ostream.h
+++ b/libcxx/include/__chrono/ostream.h
@@ -12,7 +12,7 @@
#include <__config>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__chrono/calendar.h>
# include <__chrono/day.h>
@@ -86,7 +86,7 @@ _LIBCPP_HIDE_FROM_ABI auto __units_suffix() {
else if constexpr (same_as<typename _Period::type, nano>)
return _LIBCPP_STATICALLY_WIDEN(_CharT, "ns");
else if constexpr (same_as<typename _Period::type, micro>)
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
return _LIBCPP_STATICALLY_WIDEN(_CharT, "\u00b5s");
# else
return _LIBCPP_STATICALLY_WIDEN(_CharT, "us");
@@ -307,7 +307,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const local_info& __info) {
_LIBCPP_STATICALLY_WIDEN(_CharT, "{}: {{{}, {}}}"), __result(), __info.first, __info.second);
}
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
template <class _CharT, class _Traits, class _Duration, class _TimeZonePtr>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const zoned_time<_Duration, _TimeZonePtr>& __tp) {
@@ -322,6 +322,6 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const zoned_time<_Duration, _Ti
_LIBCPP_END_NAMESPACE_STD
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP___CHRONO_OSTREAM_H
diff --git a/libcxx/include/__chrono/parser_std_format_spec.h b/libcxx/include/__chrono/parser_std_format_spec.h
index c9cfcc6..3976864 100644
--- a/libcxx/include/__chrono/parser_std_format_spec.h
+++ b/libcxx/include/__chrono/parser_std_format_spec.h
@@ -12,7 +12,7 @@
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__format/concepts.h>
# include <__format/format_error.h>
@@ -416,6 +416,6 @@ private:
_LIBCPP_END_NAMESPACE_STD
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H
diff --git a/libcxx/include/__chrono/statically_widen.h b/libcxx/include/__chrono/statically_widen.h
index 680483a..40e0856 100644
--- a/libcxx/include/__chrono/statically_widen.h
+++ b/libcxx/include/__chrono/statically_widen.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <__fmt_char_type _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __str, const wchar_t* __wstr) {
if constexpr (same_as<_CharT, char>)
@@ -33,7 +33,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __s
return __wstr;
}
# define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str, L##__str)
-# else // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# else // _LIBCPP_HAS_WIDE_CHARACTERS
// Without this indirection the unit test test/libcxx/modules_include.sh.cpp
// fails for the CI build "No wide characters". This seems like a bug.
@@ -43,7 +43,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __s
return __str;
}
# define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str)
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__chrono/steady_clock.h b/libcxx/include/__chrono/steady_clock.h
index 612a7f15..1b247b2 100644
--- a/libcxx/include/__chrono/steady_clock.h
+++ b/libcxx/include/__chrono/steady_clock.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono {
-#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
+#if _LIBCPP_HAS_MONOTONIC_CLOCK
class _LIBCPP_EXPORTED_FROM_ABI steady_clock {
public:
typedef nanoseconds duration;
diff --git a/libcxx/include/__chrono/time_zone.h b/libcxx/include/__chrono/time_zone.h
index de11dac..3bfe482 100644
--- a/libcxx/include/__chrono/time_zone.h
+++ b/libcxx/include/__chrono/time_zone.h
@@ -37,8 +37,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-# if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
namespace chrono {
@@ -170,8 +169,8 @@ operator<=>(const time_zone& __x, const time_zone& __y) noexcept {
} // namespace chrono
-# endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
- // && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM &&
+ // _LIBCPP_HAS_LOCALIZATION
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__chrono/time_zone_link.h b/libcxx/include/__chrono/time_zone_link.h
index 7b15f6a..a408bff 100644
--- a/libcxx/include/__chrono/time_zone_link.h
+++ b/libcxx/include/__chrono/time_zone_link.h
@@ -31,8 +31,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-# if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
namespace chrono {
@@ -68,7 +67,8 @@ operator<=>(const time_zone_link& __x, const time_zone_link& __y) noexcept {
} // namespace chrono
-# endif // _LIBCPP_STD_VER >= 20
+# endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM &&
+ // _LIBCPP_HAS_LOCALIZATION
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__chrono/tzdb.h b/libcxx/include/__chrono/tzdb.h
index 5bbb82f..8052043 100644
--- a/libcxx/include/__chrono/tzdb.h
+++ b/libcxx/include/__chrono/tzdb.h
@@ -36,8 +36,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-# if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
namespace chrono {
@@ -85,8 +84,8 @@ private:
} // namespace chrono
-# endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
- // && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM &&
+ // _LIBCPP_HAS_LOCALIZATION
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__chrono/tzdb_list.h b/libcxx/include/__chrono/tzdb_list.h
index 18446d9..9c50776 100644
--- a/libcxx/include/__chrono/tzdb_list.h
+++ b/libcxx/include/__chrono/tzdb_list.h
@@ -29,8 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-# if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
namespace chrono {
@@ -99,8 +98,8 @@ _LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI const tzdb& reload_tzdb();
} // namespace chrono
-# endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
- // && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM &&
+ // _LIBCPP_HAS_LOCALIZATION
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__chrono/zoned_time.h b/libcxx/include/__chrono/zoned_time.h
index c7252cb..272fa047 100644
--- a/libcxx/include/__chrono/zoned_time.h
+++ b/libcxx/include/__chrono/zoned_time.h
@@ -40,8 +40,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-# if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
namespace chrono {
@@ -217,8 +216,8 @@ operator==(const zoned_time<_Duration1, _TimeZonePtr>& __lhs, const zoned_time<_
} // namespace chrono
-# endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
- // && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM &&
+ // _LIBCPP_HAS_LOCALIZATION
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__condition_variable/condition_variable.h b/libcxx/include/__condition_variable/condition_variable.h
index 6141254..499e6f0 100644
--- a/libcxx/include/__condition_variable/condition_variable.h
+++ b/libcxx/include/__condition_variable/condition_variable.h
@@ -33,7 +33,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
// enum class cv_status
_LIBCPP_DECLARE_STRONG_ENUM(cv_status){no_timeout, timeout};
@@ -91,7 +91,7 @@ private:
_LIBCPP_HIDE_FROM_ABI void
__do_timed_wait(unique_lock<mutex>& __lk, chrono::time_point<_Clock, chrono::nanoseconds>) _NOEXCEPT;
};
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
template <class _Rep, class _Period, __enable_if_t<is_floating_point<_Rep>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
@@ -140,7 +140,7 @@ inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::
return nanoseconds(__result);
}
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
template <class _Predicate>
void condition_variable::wait(unique_lock<mutex>& __lk, _Predicate __pred) {
while (!__pred())
@@ -235,7 +235,7 @@ inline void condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
wait_for(__lk, __tp - _Clock::now());
}
-#endif // _LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 308dcc9..a2a1aa2 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -806,10 +806,10 @@ typedef __char32_t char32_t;
// Thread API
// clang-format off
-# if !defined(_LIBCPP_HAS_NO_THREADS) && \
- !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \
- !defined(_LIBCPP_HAS_THREAD_API_WIN32) && \
- !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+# if _LIBCPP_HAS_THREADS && \
+ !_LIBCPP_HAS_THREAD_API_PTHREAD && \
+ !_LIBCPP_HAS_THREAD_API_WIN32 && \
+ !_LIBCPP_HAS_THREAD_API_EXTERNAL
# if defined(__FreeBSD__) || \
defined(__wasi__) || \
@@ -823,18 +823,21 @@ typedef __char32_t char32_t;
defined(_AIX) || \
defined(__EMSCRIPTEN__)
// clang-format on
-# define _LIBCPP_HAS_THREAD_API_PTHREAD
+# undef _LIBCPP_HAS_THREAD_API_PTHREAD
+# define _LIBCPP_HAS_THREAD_API_PTHREAD 1
# elif defined(__Fuchsia__)
// TODO(44575): Switch to C11 thread API when possible.
-# define _LIBCPP_HAS_THREAD_API_PTHREAD
+# undef _LIBCPP_HAS_THREAD_API_PTHREAD
+# define _LIBCPP_HAS_THREAD_API_PTHREAD 1
# elif defined(_LIBCPP_WIN32API)
-# define _LIBCPP_HAS_THREAD_API_WIN32
+# undef _LIBCPP_HAS_THREAD_API_WIN32
+# define _LIBCPP_HAS_THREAD_API_WIN32 1
# else
# error "No thread API"
# endif // _LIBCPP_HAS_THREAD_API
-# endif // _LIBCPP_HAS_NO_THREADS
+# endif // _LIBCPP_HAS_THREADS
-# if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+# if _LIBCPP_HAS_THREAD_API_PTHREAD
# if defined(__ANDROID__) && __ANDROID_API__ >= 30
# define _LIBCPP_HAS_COND_CLOCKWAIT 1
# elif defined(_LIBCPP_GLIBC_PREREQ)
@@ -850,22 +853,19 @@ typedef __char32_t char32_t;
# define _LIBCPP_HAS_COND_CLOCKWAIT 0
# endif
-# if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
-# error _LIBCPP_HAS_THREAD_API_PTHREAD may only be defined when \
- _LIBCPP_HAS_NO_THREADS is not defined.
+# if !_LIBCPP_HAS_THREADS && _LIBCPP_HAS_THREAD_API_PTHREAD
+# error _LIBCPP_HAS_THREAD_API_PTHREAD may only be true when _LIBCPP_HAS_THREADS is true.
# endif
-# if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
-# error _LIBCPP_HAS_THREAD_API_EXTERNAL may not be defined when \
- _LIBCPP_HAS_NO_THREADS is defined.
+# if !_LIBCPP_HAS_THREADS && _LIBCPP_HAS_THREAD_API_EXTERNAL
+# error _LIBCPP_HAS_THREAD_API_EXTERNAL may not be true when _LIBCPP_HAS_THREADS is true.
# endif
-# if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
-# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
- _LIBCPP_HAS_NO_THREADS is defined.
+# if !_LIBCPP_HAS_MONOTONIC_CLOCK && _LIBCPP_HAS_THREADS
+# error _LIBCPP_HAS_MONOTONIC_CLOCK may only be false when _LIBCPP_HAS_THREADS is false.
# endif
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(__STDCPP_THREADS__)
+# if _LIBCPP_HAS_THREADS && !defined(__STDCPP_THREADS__)
# define __STDCPP_THREADS__ 1
# endif
@@ -880,9 +880,9 @@ typedef __char32_t char32_t;
// TODO(EricWF): Enable this optimization on Bionic after speaking to their
// respective stakeholders.
// clang-format off
-# if (defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && defined(__GLIBC__)) || \
- (defined(_LIBCPP_HAS_THREAD_API_C11) && defined(__Fuchsia__)) || \
- defined(_LIBCPP_HAS_THREAD_API_WIN32)
+# if (_LIBCPP_HAS_THREAD_API_PTHREAD && defined(__GLIBC__)) || \
+ (_LIBCPP_HAS_THREAD_API_C11 && defined(__Fuchsia__)) || \
+ _LIBCPP_HAS_THREAD_API_WIN32
// clang-format on
# define _LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION 1
# else
@@ -897,25 +897,28 @@ typedef __char32_t char32_t;
//
// TODO(EricWF): This is potentially true for some pthread implementations
// as well.
-# if (defined(_LIBCPP_HAS_THREAD_API_C11) && defined(__Fuchsia__)) || defined(_LIBCPP_HAS_THREAD_API_WIN32)
+# if (_LIBCPP_HAS_THREAD_API_C11 && defined(__Fuchsia__)) || _LIBCPP_HAS_THREAD_API_WIN32
# define _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION 1
# else
# define _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION 0
# endif
# if defined(__BIONIC__) || defined(__NuttX__) || defined(__Fuchsia__) || defined(__wasi__) || \
- defined(_LIBCPP_HAS_MUSL_LIBC) || defined(__OpenBSD__) || defined(__LLVM_LIBC__)
+ _LIBCPP_HAS_MUSL_LIBC || defined(__OpenBSD__) || defined(__LLVM_LIBC__)
# define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
# endif
# if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic)
-# define _LIBCPP_HAS_C_ATOMIC_IMP
+# define _LIBCPP_HAS_C_ATOMIC_IMP 1
+# define _LIBCPP_HAS_GCC_ATOMIC_IMP 0
+# define _LIBCPP_HAS_EXTERNAL_ATOMIC_IMP 0
# elif defined(_LIBCPP_COMPILER_GCC)
-# define _LIBCPP_HAS_GCC_ATOMIC_IMP
+# define _LIBCPP_HAS_C_ATOMIC_IMP 0
+# define _LIBCPP_HAS_GCC_ATOMIC_IMP 1
+# define _LIBCPP_HAS_EXTERNAL_ATOMIC_IMP 0
# endif
-# if !defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) && \
- !defined(_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP)
+# if !_LIBCPP_HAS_C_ATOMIC_IMP && !_LIBCPP_HAS_GCC_ATOMIC_IMP && !_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP
# define _LIBCPP_HAS_ATOMIC_HEADER 0
# else
# define _LIBCPP_HAS_ATOMIC_HEADER 1
@@ -976,7 +979,7 @@ typedef __char32_t char32_t;
// When wide characters are disabled, it can be useful to have a quick way of
// disabling it without having to resort to #if-#endif, which has a larger
// impact on readability.
-# if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+# if !_LIBCPP_HAS_WIDE_CHARACTERS
# define _LIBCPP_IF_WIDE_CHARACTERS(...)
# else
# define _LIBCPP_IF_WIDE_CHARACTERS(...) __VA_ARGS__
diff --git a/libcxx/include/__config_site.in b/libcxx/include/__config_site.in
index bf2d31d..fc01aaf 100644
--- a/libcxx/include/__config_site.in
+++ b/libcxx/include/__config_site.in
@@ -11,27 +11,28 @@
#cmakedefine _LIBCPP_ABI_VERSION @_LIBCPP_ABI_VERSION@
#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
-#cmakedefine _LIBCPP_ABI_FORCE_ITANIUM
-#cmakedefine _LIBCPP_ABI_FORCE_MICROSOFT
-#cmakedefine _LIBCPP_HAS_NO_THREADS
-#cmakedefine _LIBCPP_HAS_NO_MONOTONIC_CLOCK
-#cmakedefine _LIBCPP_HAS_NO_TERMINAL
-#cmakedefine _LIBCPP_HAS_MUSL_LIBC
-#cmakedefine _LIBCPP_HAS_THREAD_API_PTHREAD
-#cmakedefine _LIBCPP_HAS_THREAD_API_EXTERNAL
-#cmakedefine _LIBCPP_HAS_THREAD_API_WIN32
+#cmakedefine01 _LIBCPP_ABI_FORCE_ITANIUM
+#cmakedefine01 _LIBCPP_ABI_FORCE_MICROSOFT
+#cmakedefine01 _LIBCPP_HAS_THREADS
+#cmakedefine01 _LIBCPP_HAS_MONOTONIC_CLOCK
+#cmakedefine01 _LIBCPP_HAS_TERMINAL
+#cmakedefine01 _LIBCPP_HAS_MUSL_LIBC
+#cmakedefine01 _LIBCPP_HAS_THREAD_API_PTHREAD
+#cmakedefine01 _LIBCPP_HAS_THREAD_API_EXTERNAL
+#cmakedefine01 _LIBCPP_HAS_THREAD_API_WIN32
+#define _LIBCPP_HAS_THREAD_API_C11 0 // FIXME: Is this guarding dead code?
#cmakedefine _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
-#cmakedefine _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
+#cmakedefine01 _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS
#cmakedefine _LIBCPP_NO_VCRUNTIME
#cmakedefine _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION @_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION@
-#cmakedefine _LIBCPP_HAS_NO_FILESYSTEM
-#cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE
-#cmakedefine _LIBCPP_HAS_NO_LOCALIZATION
-#cmakedefine _LIBCPP_HAS_NO_UNICODE
-#cmakedefine _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#cmakedefine01 _LIBCPP_HAS_FILESYSTEM
+#cmakedefine01 _LIBCPP_HAS_RANDOM_DEVICE
+#cmakedefine01 _LIBCPP_HAS_LOCALIZATION
+#cmakedefine01 _LIBCPP_HAS_UNICODE
+#cmakedefine01 _LIBCPP_HAS_WIDE_CHARACTERS
#cmakedefine _LIBCPP_HAS_NO_STD_MODULES
-#cmakedefine _LIBCPP_HAS_NO_TIME_ZONE_DATABASE
-#cmakedefine _LIBCPP_INSTRUMENTED_WITH_ASAN
+#cmakedefine01 _LIBCPP_HAS_TIME_ZONE_DATABASE
+#cmakedefine01 _LIBCPP_INSTRUMENTED_WITH_ASAN
// PSTL backends
#cmakedefine _LIBCPP_PSTL_BACKEND_SERIAL
diff --git a/libcxx/include/__configuration/abi.h b/libcxx/include/__configuration/abi.h
index 7095d56..8c8d304 100644
--- a/libcxx/include/__configuration/abi.h
+++ b/libcxx/include/__configuration/abi.h
@@ -23,11 +23,11 @@
// that Windows compilers pretending to be MSVC++ target the Microsoft ABI,
// and allow the user to explicitly specify the ABI to handle cases where this
// heuristic falls short.
-#if defined(_LIBCPP_ABI_FORCE_ITANIUM) && defined(_LIBCPP_ABI_FORCE_MICROSOFT)
-# error "Only one of _LIBCPP_ABI_FORCE_ITANIUM and _LIBCPP_ABI_FORCE_MICROSOFT can be defined"
-#elif defined(_LIBCPP_ABI_FORCE_ITANIUM)
+#if _LIBCPP_ABI_FORCE_ITANIUM && _LIBCPP_ABI_FORCE_MICROSOFT
+# error "Only one of _LIBCPP_ABI_FORCE_ITANIUM and _LIBCPP_ABI_FORCE_MICROSOFT can be true"
+#elif _LIBCPP_ABI_FORCE_ITANIUM
# define _LIBCPP_ABI_ITANIUM
-#elif defined(_LIBCPP_ABI_FORCE_MICROSOFT)
+#elif _LIBCPP_ABI_FORCE_MICROSOFT
# define _LIBCPP_ABI_MICROSOFT
#else
# if defined(_WIN32) && defined(_MSC_VER)
diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
index 173999c..d805c5a 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -70,22 +70,20 @@
// For backwards compatibility, allow users to define _LIBCPP_DISABLE_AVAILABILITY
// for a while.
#if defined(_LIBCPP_DISABLE_AVAILABILITY)
-# if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
-# define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
-# endif
+# undef _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS
+# define _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS 0
#endif
// Availability markup is disabled when building the library, or when a non-Clang
// compiler is used because only Clang supports the necessary attributes.
#if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCXXABI_BUILDING_LIBRARY) || !defined(_LIBCPP_COMPILER_CLANG_BASED)
-# if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
-# define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
-# endif
+# undef _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS
+# define _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS 0
#endif
// When availability annotations are disabled, we take for granted that features introduced
// in all versions of the library are available.
-#if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
+#if !_LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS
# define _LIBCPP_INTRODUCED_IN_LLVM_20 1
# define _LIBCPP_INTRODUCED_IN_LLVM_20_ATTRIBUTE /* nothing */
diff --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h
index d5daa3f..7d0c01b 100644
--- a/libcxx/include/__filesystem/directory_entry.h
+++ b/libcxx/include/__filesystem/directory_entry.h
@@ -34,7 +34,7 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#if _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
@@ -469,7 +469,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#endif // _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_POP_MACROS
diff --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h
index 621e9bf9..f5085b3 100644
--- a/libcxx/include/__filesystem/directory_iterator.h
+++ b/libcxx/include/__filesystem/directory_iterator.h
@@ -30,7 +30,7 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#if _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
@@ -143,7 +143,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline constexpr bool
# endif // _LIBCPP_STD_VER >= 20
-#endif // _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#endif // _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_POP_MACROS
diff --git a/libcxx/include/__filesystem/operations.h b/libcxx/include/__filesystem/operations.h
index f588189..904023d 100644
--- a/libcxx/include/__filesystem/operations.h
+++ b/libcxx/include/__filesystem/operations.h
@@ -27,7 +27,7 @@
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#if _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
@@ -305,6 +305,6 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#endif // _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
#endif // _LIBCPP___FILESYSTEM_OPERATIONS_H
diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h
index 88c800f..509d1cc 100644
--- a/libcxx/include/__filesystem/path.h
+++ b/libcxx/include/__filesystem/path.h
@@ -25,7 +25,7 @@
#include <string>
#include <string_view>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <iomanip> // for quoted
# include <locale>
#endif
@@ -199,7 +199,7 @@ _LIBCPP_EXPORTED_FROM_ABI size_t __char_to_wide(const string&, wchar_t*, size_t)
template <class _ECharT>
struct _PathCVT;
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
template <class _ECharT>
struct _PathCVT {
static_assert(__can_convert_char<_ECharT>::value, "Char type not convertible");
@@ -258,7 +258,7 @@ struct _PathCVT {
__append_range(__dest, _Traits::__range_begin(__s), _Traits::__range_end(__s));
}
};
-# endif // !_LIBCPP_HAS_NO_LOCALIZATION
+# endif // _LIBCPP_HAS_LOCALIZATION
template <>
struct _PathCVT<__path_value> {
@@ -420,7 +420,7 @@ public:
}
/*
- #if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+ #if _LIBCPP_HAS_LOCALIZATION
// TODO Implement locale conversions.
template <class _Source, class = _EnableIfPathable<_Source, void> >
path(const _Source& __src, const locale& __loc, format = format::auto_format);
@@ -682,7 +682,7 @@ public:
return __s;
}
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
template <class _ECharT, class _Traits = char_traits<_ECharT>, class _Allocator = allocator<_ECharT> >
_LIBCPP_HIDE_FROM_ABI basic_string<_ECharT, _Traits, _Allocator> string(const _Allocator& __a = _Allocator()) const {
using _Str = basic_string<_ECharT, _Traits, _Allocator>;
@@ -725,7 +725,7 @@ public:
std::replace(__s.begin(), __s.end(), '\\', '/');
return __s;
}
-# endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
+# endif // _LIBCPP_HAS_LOCALIZATION
# else /* _LIBCPP_WIN32API */
_LIBCPP_HIDE_FROM_ABI std::string string() const { return __pn_; }
@@ -735,7 +735,7 @@ public:
_LIBCPP_HIDE_FROM_ABI std::string u8string() const { return __pn_; }
# endif
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
template <class _ECharT, class _Traits = char_traits<_ECharT>, class _Allocator = allocator<_ECharT> >
_LIBCPP_HIDE_FROM_ABI basic_string<_ECharT, _Traits, _Allocator> string(const _Allocator& __a = _Allocator()) const {
using _CVT = __widen_from_utf8<sizeof(_ECharT) * __CHAR_BIT__>;
@@ -746,12 +746,12 @@ public:
return __s;
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_HIDE_FROM_ABI std::wstring wstring() const { return string<wchar_t>(); }
# endif
_LIBCPP_HIDE_FROM_ABI std::u16string u16string() const { return string<char16_t>(); }
_LIBCPP_HIDE_FROM_ABI std::u32string u32string() const { return string<char32_t>(); }
-# endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
+# endif // _LIBCPP_HAS_LOCALIZATION
// generic format observers
_LIBCPP_HIDE_FROM_ABI std::string generic_string() const { return __pn_; }
@@ -761,19 +761,19 @@ public:
_LIBCPP_HIDE_FROM_ABI std::string generic_u8string() const { return __pn_; }
# endif
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
template <class _ECharT, class _Traits = char_traits<_ECharT>, class _Allocator = allocator<_ECharT> >
_LIBCPP_HIDE_FROM_ABI basic_string<_ECharT, _Traits, _Allocator>
generic_string(const _Allocator& __a = _Allocator()) const {
return string<_ECharT, _Traits, _Allocator>(__a);
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_HIDE_FROM_ABI std::wstring generic_wstring() const { return string<wchar_t>(); }
# endif
_LIBCPP_HIDE_FROM_ABI std::u16string generic_u16string() const { return string<char16_t>(); }
_LIBCPP_HIDE_FROM_ABI std::u32string generic_u32string() const { return string<char32_t>(); }
-# endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
+# endif // _LIBCPP_HAS_LOCALIZATION
# endif /* !_LIBCPP_WIN32API */
private:
@@ -866,7 +866,7 @@ public:
iterator begin() const;
iterator end() const;
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
template <
class _CharT,
class _Traits,
@@ -895,7 +895,7 @@ public:
__p = __tmp;
return __is;
}
-# endif // !_LIBCPP_HAS_NO_LOCALIZATION
+# endif // _LIBCPP_HAS_LOCALIZATION
private:
inline _LIBCPP_HIDE_FROM_ABI path& __assign_view(__string_view const& __s) {
diff --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h
index 1be92a8..ad01a99 100644
--- a/libcxx/include/__filesystem/recursive_directory_iterator.h
+++ b/libcxx/include/__filesystem/recursive_directory_iterator.h
@@ -29,7 +29,7 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#if _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
@@ -156,7 +156,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY inline constexpr bool
# endif // _LIBCPP_STD_VER >= 20
-#endif // _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#endif // _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_POP_MACROS
diff --git a/libcxx/include/__format/concepts.h b/libcxx/include/__format/concepts.h
index 737783e..2c40e3e 100644
--- a/libcxx/include/__format/concepts.h
+++ b/libcxx/include/__format/concepts.h
@@ -34,7 +34,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT>
concept __fmt_char_type =
same_as<_CharT, char>
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
|| same_as<_CharT, wchar_t>
# endif
;
diff --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index 847b39d..8b2c95c 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -49,7 +49,7 @@ template <class _Context, same_as<typename _Context::char_type> _Tp>
consteval __arg_t __determine_arg_t() {
return __arg_t::__char_type;
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _Context, class _CharT>
requires(same_as<typename _Context::char_type, wchar_t> && same_as<_CharT, char>)
consteval __arg_t __determine_arg_t() {
@@ -173,7 +173,7 @@ _LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp& __valu
// final else requires no adjustment.
if constexpr (__arg == __arg_t::__char_type)
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
if constexpr (same_as<typename _Context::char_type, wchar_t> && same_as<_Dp, char>)
return basic_format_arg<_Context>{__arg, static_cast<wchar_t>(static_cast<unsigned char>(__value))};
else
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index ecbf627..4dbfdbc 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -24,7 +24,7 @@
#include <__utility/move.h>
#include <__variant/monostate.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__locale>
# include <optional>
#endif
@@ -44,7 +44,7 @@ template <class _OutIt, class _CharT>
requires output_iterator<_OutIt, const _CharT&>
class _LIBCPP_TEMPLATE_VIS basic_format_context;
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
/**
* Helper to create a basic_format_context.
*
@@ -66,7 +66,7 @@ __format_context_create(_OutIt __out_it, basic_format_args<basic_format_context<
# endif
using format_context = basic_format_context<back_insert_iterator<__format::__output_buffer<char>>, char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using wformat_context = basic_format_context< back_insert_iterator<__format::__output_buffer<wchar_t>>, wchar_t>;
# endif
@@ -88,7 +88,7 @@ public:
_LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context> arg(size_t __id) const noexcept {
return __args_.get(__id);
}
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
_LIBCPP_HIDE_FROM_ABI std::locale locale() {
if (!__loc_)
__loc_ = std::locale{};
@@ -101,7 +101,7 @@ public:
private:
iterator __out_it_;
basic_format_args<basic_format_context> __args_;
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
// The Standard doesn't specify how the locale is stored.
// [format.context]/6
@@ -163,7 +163,7 @@ public:
template <class _Context>
_LIBCPP_HIDE_FROM_ABI explicit basic_format_context(iterator __out_it, _Context& __ctx)
: __out_it_(std::move(__out_it)),
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
__loc_([](void* __c) { return static_cast<_Context*>(__c)->locale(); }),
# endif
__ctx_(std::addressof(__ctx)),
@@ -193,7 +193,7 @@ public:
_LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context> arg(size_t __id) const noexcept {
return __arg_(__ctx_, __id);
}
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
_LIBCPP_HIDE_FROM_ABI std::locale locale() { return __loc_(__ctx_); }
# endif
_LIBCPP_HIDE_FROM_ABI iterator out() { return std::move(__out_it_); }
@@ -202,7 +202,7 @@ public:
private:
iterator __out_it_;
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
std::locale (*__loc_)(void* __ctx);
# endif
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index b3cda8b..3991363 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -40,7 +40,7 @@
#include <string>
#include <string_view>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__locale>
#endif
@@ -61,7 +61,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// to do this optimization now.
using format_args = basic_format_args<format_context>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using wformat_args = basic_format_args<wformat_context>;
# endif
@@ -70,7 +70,7 @@ template <class _Context = format_context, class... _Args>
return std::__format_arg_store<_Context, _Args...>(__args...);
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...> make_wformat_args(_Args&... __args) {
return std::__format_arg_store<wformat_context, _Args...>(__args...);
@@ -355,7 +355,7 @@ public:
};
_LIBCPP_HIDE_FROM_ABI inline __runtime_format_string<char> runtime_format(string_view __fmt) noexcept { return __fmt; }
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_HIDE_FROM_ABI inline __runtime_format_string<wchar_t> runtime_format(wstring_view __fmt) noexcept {
return __fmt;
}
@@ -397,7 +397,7 @@ private:
template <class... _Args>
using format_string = basic_format_string<char, type_identity_t<_Args>...>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>;
# endif
@@ -426,7 +426,7 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(_OutIt __out_it, s
return std::__vformat_to(std::move(__out_it), __fmt, __args);
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt>
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
@@ -440,7 +440,7 @@ format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat_to(std::move(__out_it), __fmt.get(), std::make_format_args(__args...));
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -457,7 +457,7 @@ template <class = void>
return __res;
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
// TODO FMT This needs to be a template or std::to_chars(floating-point) availability markup
// fires too eagerly, see http://llvm.org/PR61563.
template <class = void>
@@ -475,7 +475,7 @@ format(format_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat(__fmt.get(), std::make_format_args(__args...));
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI wstring
format(wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -501,7 +501,7 @@ format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, format_string<_Args.
return std::__vformat_to_n<format_context>(std::move(__out_it), __n, __fmt.get(), std::make_format_args(__args...));
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -523,7 +523,7 @@ formatted_size(format_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformatted_size(__fmt.get(), basic_format_args{std::make_format_args(__args...)});
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -531,7 +531,7 @@ formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
}
# endif
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
template <class _OutIt, class _CharT, class _FormatOutIt>
requires(output_iterator<_OutIt, const _CharT&>)
@@ -558,7 +558,7 @@ vformat_to(_OutIt __out_it, locale __loc, string_view __fmt, format_args __args)
return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt, __args);
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt>
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
vformat_to(_OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
@@ -572,7 +572,7 @@ format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&.
return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(), std::make_format_args(__args...));
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -590,7 +590,7 @@ vformat(locale __loc, string_view __fmt, format_args __args) {
return __res;
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
// TODO FMT This needs to be a template or std::to_chars(floating-point) availability markup
// fires too eagerly, see http://llvm.org/PR61563.
template <class = void>
@@ -608,7 +608,7 @@ format(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat(std::move(__loc), __fmt.get(), std::make_format_args(__args...));
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI wstring
format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -637,7 +637,7 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> format_to
std::move(__out_it), __n, std::move(__loc), __fmt.get(), std::make_format_args(__args...));
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> format_to_n(
_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -661,7 +661,7 @@ formatted_size(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformatted_size(std::move(__loc), __fmt.get(), basic_format_args{std::make_format_args(__args...)});
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
@@ -669,7 +669,7 @@ formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args)
}
# endif
-# endif // _LIBCPP_HAS_NO_LOCALIZATION
+# endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__format/format_parse_context.h b/libcxx/include/__format/format_parse_context.h
index 54c2301..459db75 100644
--- a/libcxx/include/__format/format_parse_context.h
+++ b/libcxx/include/__format/format_parse_context.h
@@ -94,7 +94,7 @@ private:
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_parse_context);
using format_parse_context = basic_format_parse_context<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using wformat_parse_context = basic_format_parse_context<wchar_t>;
# endif
diff --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h
index a43eba5..d08acd4 100644
--- a/libcxx/include/__format/formatter_bool.h
+++ b/libcxx/include/__format/formatter_bool.h
@@ -20,7 +20,7 @@
#include <__format/parser_std_format_spec.h>
#include <__utility/unreachable.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__locale>
#endif
diff --git a/libcxx/include/__format/formatter_char.h b/libcxx/include/__format/formatter_char.h
index a96acba..8b8fd2d 100644
--- a/libcxx/include/__format/formatter_char.h
+++ b/libcxx/include/__format/formatter_char.h
@@ -77,21 +77,21 @@ public:
template <>
struct _LIBCPP_TEMPLATE_VIS formatter<char, char> : public __formatter_char<char> {};
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS formatter<char, wchar_t> : public __formatter_char<wchar_t> {};
template <>
struct _LIBCPP_TEMPLATE_VIS formatter<wchar_t, wchar_t> : public __formatter_char<wchar_t> {};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
# if _LIBCPP_STD_VER >= 23
template <>
inline constexpr bool enable_nonlocking_formatter_optimization<char> = true;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
inline constexpr bool enable_nonlocking_formatter_optimization<wchar_t> = true;
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
# endif // _LIBCPP_STD_VER >= 23
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index 90720a5..e04fffb6 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -38,7 +38,7 @@
#include <__utility/unreachable.h>
#include <cmath>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__locale>
#endif
@@ -491,7 +491,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer(
}
}
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
template <class _OutIt, class _Fp, class _CharT>
_LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
_OutIt __out_it,
@@ -576,7 +576,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
// alignment
return __formatter::__fill(std::move(__out_it), __padding.__after_, __specs.__fill_);
}
-# endif // _LIBCPP_HAS_NO_LOCALIZATION
+# endif // _LIBCPP_HAS_LOCALIZATION
template <class _OutIt, class _CharT>
_LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
@@ -705,7 +705,7 @@ __format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__par
}
}
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
if (__specs.__std_.__locale_specific_form_)
return __formatter::__format_locale_specific_form(__ctx.out(), __buffer, __result, __ctx.locale(), __specs);
# endif
diff --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h
index 0c04cce..996b762 100644
--- a/libcxx/include/__format/formatter_integral.h
+++ b/libcxx/include/__format/formatter_integral.h
@@ -32,7 +32,7 @@
#include <string>
#include <string_view>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__locale>
#endif
@@ -298,7 +298,7 @@ _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator __format_integer(
_Iterator __last = __formatter::__to_buffer(__first, __end, __value, __base);
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
if (__specs.__std_.__locale_specific_form_) {
const auto& __np = std::use_facet<numpunct<_CharT>>(__ctx.locale());
string __grouping = __np.grouping();
@@ -412,7 +412,7 @@ struct _LIBCPP_TEMPLATE_VIS __bool_strings<char> {
static constexpr string_view __false{"false"};
};
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS __bool_strings<wchar_t> {
static constexpr wstring_view __true{L"true"};
@@ -423,7 +423,7 @@ struct _LIBCPP_TEMPLATE_VIS __bool_strings<wchar_t> {
template <class _CharT, class _FormatContext>
_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
__format_bool(bool __value, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) {
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
if (__specs.__std_.__locale_specific_form_) {
const auto& __np = std::use_facet<numpunct<_CharT>>(__ctx.locale());
basic_string<_CharT> __str = __value ? __np.truename() : __np.falsename();
diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h
index 457f5f5..e1f1309 100644
--- a/libcxx/include/__format/formatter_output.h
+++ b/libcxx/include/__format/formatter_output.h
@@ -169,7 +169,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value)
}
}
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
requires(same_as<_CharT, char>)
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
@@ -183,7 +183,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::
return __out_it;
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
requires(same_as<_CharT, wchar_t> && sizeof(wchar_t) == 2)
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
@@ -201,13 +201,13 @@ template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
return __formatter::__fill(std::move(__out_it), __n, __value.__data[0]);
}
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
-# else // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
+# else // _LIBCPP_HAS_UNICODE
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
return __formatter::__fill(std::move(__out_it), __n, __value.__data[0]);
}
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
/// Writes the input to the output with the required padding.
///
@@ -295,8 +295,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_transformed(
///
/// \pre !__specs.__has_precision()
///
-/// \note When \c _LIBCPP_HAS_NO_UNICODE is defined the function assumes the
-/// input is ASCII.
+/// \note When \c _LIBCPP_HAS_UNICODE is false the function assumes the input is ASCII.
template <class _CharT>
_LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
basic_string_view<_CharT> __str,
diff --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index 23c880d..826d642 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -137,7 +137,7 @@ inline constexpr bool enable_nonlocking_formatter_optimization<basic_string<char
template <class _Traits>
inline constexpr bool enable_nonlocking_formatter_optimization<basic_string_view<char, _Traits>> = true;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
inline constexpr bool enable_nonlocking_formatter_optimization<wchar_t*> = true;
template <>
@@ -148,7 +148,7 @@ template <class _Traits, class _Allocator>
inline constexpr bool enable_nonlocking_formatter_optimization<basic_string<wchar_t, _Traits, _Allocator>> = true;
template <class _Traits>
inline constexpr bool enable_nonlocking_formatter_optimization<basic_string_view<wchar_t, _Traits>> = true;
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
# endif // _LIBCPP_STD_VER >= 23
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h
index 6bdf8e3..415261a 100644
--- a/libcxx/include/__format/parser_std_format_spec.h
+++ b/libcxx/include/__format/parser_std_format_spec.h
@@ -268,7 +268,7 @@ struct __code_point<char> {
char __data[4] = {' '};
};
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct __code_point<wchar_t> {
wchar_t __data[4 / sizeof(wchar_t)] = {L' '};
@@ -321,7 +321,7 @@ struct __parsed_specifications {
// value in formatting functions.
static_assert(sizeof(__parsed_specifications<char>) == 16);
static_assert(is_trivially_copyable_v<__parsed_specifications<char>>);
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
static_assert(sizeof(__parsed_specifications<wchar_t>) == 16);
static_assert(is_trivially_copyable_v<__parsed_specifications<wchar_t>>);
# endif
@@ -580,11 +580,11 @@ private:
std::__throw_format_error("The fill option contains an invalid value");
}
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
// range-fill and tuple-fill are identical
template <contiguous_iterator _Iterator>
requires same_as<_CharT, char>
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
|| (same_as<_CharT, wchar_t> && sizeof(wchar_t) == 2)
# endif
_LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
@@ -617,7 +617,7 @@ private:
return true;
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <contiguous_iterator _Iterator>
requires(same_as<_CharT, wchar_t> && sizeof(wchar_t) == 4)
_LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
@@ -643,9 +643,9 @@ private:
return true;
}
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
-# else // _LIBCPP_HAS_NO_UNICODE
+# else // _LIBCPP_HAS_UNICODE
// range-fill and tuple-fill are identical
template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
@@ -670,7 +670,7 @@ private:
return true;
}
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
template <contiguous_iterator _Iterator>
_LIBCPP_HIDE_FROM_ABI constexpr bool __parse_sign(_Iterator& __begin) {
@@ -874,7 +874,7 @@ private:
// Validates whether the reserved bitfields don't change the size.
static_assert(sizeof(__parser<char>) == 16);
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
static_assert(sizeof(__parser<wchar_t>) == 16);
# endif
@@ -1026,7 +1026,7 @@ __column_width_result(size_t, _Iterator) -> __column_width_result<_Iterator>;
/// "rounded up".
enum class __column_width_rounding { __down, __up };
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
namespace __detail {
template <contiguous_iterator _Iterator>
@@ -1148,7 +1148,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_Iterator> __estimate_colu
__result.__width_ += __ascii_size;
return __result;
}
-# else // !defined(_LIBCPP_HAS_NO_UNICODE)
+# else // _LIBCPP_HAS_UNICODE
template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<typename basic_string_view<_CharT>::const_iterator>
__estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __column_width_rounding) noexcept {
@@ -1159,7 +1159,7 @@ __estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __col
return {__width, __str.begin() + __width};
}
-# endif // !defined(_LIBCPP_HAS_NO_UNICODE)
+# endif // _LIBCPP_HAS_UNICODE
} // namespace __format_spec
diff --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h
index ce6d55a..b4f22c7 100644
--- a/libcxx/include/__format/unicode.h
+++ b/libcxx/include/__format/unicode.h
@@ -54,7 +54,7 @@ struct __consume_result {
};
static_assert(sizeof(__consume_result) == sizeof(char32_t));
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
/// Implements the grapheme cluster boundary rules
///
@@ -235,7 +235,7 @@ private:
_Iterator __last_;
};
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_high(wchar_t __value) {
return __value >= 0xd800 && __value <= 0xdbff;
}
@@ -292,7 +292,7 @@ private:
_Iterator __first_;
_Iterator __last_;
};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
// State machine to implement the Extended Grapheme Cluster Boundary
//
@@ -566,10 +566,10 @@ private:
template <contiguous_iterator _Iterator>
__extended_grapheme_cluster_view(_Iterator, _Iterator) -> __extended_grapheme_cluster_view<iter_value_t<_Iterator>>;
-# else // _LIBCPP_HAS_NO_UNICODE
+# else // _LIBCPP_HAS_UNICODE
// For ASCII every character is a "code point".
-// This makes it easier to write code agnostic of the _LIBCPP_HAS_NO_UNICODE define.
+// This makes it easier to write code agnostic of the _LIBCPP_HAS_UNICODE define.
template <class _CharT>
class __code_point_view {
using _Iterator = typename basic_string_view<_CharT>::const_iterator;
@@ -591,7 +591,7 @@ private:
_Iterator __last_;
};
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
} // namespace __unicode
diff --git a/libcxx/include/__format/write_escaped.h b/libcxx/include/__format/write_escaped.h
index 9c288a8..aa74940 100644
--- a/libcxx/include/__format/write_escaped.h
+++ b/libcxx/include/__format/write_escaped.h
@@ -42,8 +42,7 @@ namespace __formatter {
/// Writes a string using format's width estimation algorithm.
///
-/// \note When \c _LIBCPP_HAS_NO_UNICODE is defined the function assumes the
-/// input is ASCII.
+/// \note When \c _LIBCPP_HAS_UNICODE is false the function assumes the input is ASCII.
template <class _CharT>
_LIBCPP_HIDE_FROM_ABI auto
__write_string(basic_string_view<_CharT> __str,
@@ -104,7 +103,7 @@ _LIBCPP_HIDE_FROM_ABI void __write_escape_ill_formed_code_unit(basic_string<_Cha
template <class _CharT>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool
__is_escaped_sequence_written(basic_string<_CharT>& __str, bool __last_escaped, char32_t __value) {
-# ifdef _LIBCPP_HAS_NO_UNICODE
+# if !_LIBCPP_HAS_UNICODE
// For ASCII assume everything above 127 is printable.
if (__value > 127)
return false;
diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h
index a33cba5..1f67b6a 100644
--- a/libcxx/include/__functional/hash.h
+++ b/libcxx/include/__functional/hash.h
@@ -373,12 +373,12 @@ struct _LIBCPP_TEMPLATE_VIS hash<char32_t> : public __unary_function<char32_t, s
_LIBCPP_HIDE_FROM_ABI size_t operator()(char32_t __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS hash<wchar_t> : public __unary_function<wchar_t, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(wchar_t __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS hash<short> : public __unary_function<short, size_t> {
diff --git a/libcxx/include/__fwd/fstream.h b/libcxx/include/__fwd/fstream.h
index b4a112b..e6c430d 100644
--- a/libcxx/include/__fwd/fstream.h
+++ b/libcxx/include/__fwd/fstream.h
@@ -32,7 +32,7 @@ using ifstream = basic_ifstream<char>;
using ofstream = basic_ofstream<char>;
using fstream = basic_fstream<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using wfilebuf = basic_filebuf<wchar_t>;
using wifstream = basic_ifstream<wchar_t>;
using wofstream = basic_ofstream<wchar_t>;
diff --git a/libcxx/include/__fwd/ios.h b/libcxx/include/__fwd/ios.h
index 4835070..bb0c6eb 100644
--- a/libcxx/include/__fwd/ios.h
+++ b/libcxx/include/__fwd/ios.h
@@ -24,7 +24,7 @@ template <class _CharT, class _Traits = char_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_ios;
using ios = basic_ios<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using wios = basic_ios<wchar_t>;
#endif
diff --git a/libcxx/include/__fwd/istream.h b/libcxx/include/__fwd/istream.h
index a06907a..66a6708 100644
--- a/libcxx/include/__fwd/istream.h
+++ b/libcxx/include/__fwd/istream.h
@@ -27,7 +27,7 @@ class _LIBCPP_TEMPLATE_VIS basic_iostream;
using istream = basic_istream<char>;
using iostream = basic_iostream<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using wistream = basic_istream<wchar_t>;
using wiostream = basic_iostream<wchar_t>;
#endif
diff --git a/libcxx/include/__fwd/ostream.h b/libcxx/include/__fwd/ostream.h
index 3347e0f7..ff5a361 100644
--- a/libcxx/include/__fwd/ostream.h
+++ b/libcxx/include/__fwd/ostream.h
@@ -23,7 +23,7 @@ class _LIBCPP_TEMPLATE_VIS basic_ostream;
using ostream = basic_ostream<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using wostream = basic_ostream<wchar_t>;
#endif
diff --git a/libcxx/include/__fwd/sstream.h b/libcxx/include/__fwd/sstream.h
index 39a9c3f..c176db6 100644
--- a/libcxx/include/__fwd/sstream.h
+++ b/libcxx/include/__fwd/sstream.h
@@ -34,7 +34,7 @@ using istringstream = basic_istringstream<char>;
using ostringstream = basic_ostringstream<char>;
using stringstream = basic_stringstream<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using wstringbuf = basic_stringbuf<wchar_t>;
using wistringstream = basic_istringstream<wchar_t>;
using wostringstream = basic_ostringstream<wchar_t>;
diff --git a/libcxx/include/__fwd/streambuf.h b/libcxx/include/__fwd/streambuf.h
index b35afa6..aee0ebb 100644
--- a/libcxx/include/__fwd/streambuf.h
+++ b/libcxx/include/__fwd/streambuf.h
@@ -23,7 +23,7 @@ class _LIBCPP_TEMPLATE_VIS basic_streambuf;
using streambuf = basic_streambuf<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using wstreambuf = basic_streambuf<wchar_t>;
#endif
diff --git a/libcxx/include/__fwd/string.h b/libcxx/include/__fwd/string.h
index f13a359..89dec82 100644
--- a/libcxx/include/__fwd/string.h
+++ b/libcxx/include/__fwd/string.h
@@ -34,7 +34,7 @@ struct char_traits<char16_t>;
template <>
struct char_traits<char32_t>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct char_traits<wchar_t>;
#endif
@@ -44,7 +44,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string;
using string = basic_string<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using wstring = basic_string<wchar_t>;
#endif
@@ -63,7 +63,7 @@ using basic_string _LIBCPP_AVAILABILITY_PMR = std::basic_string<_CharT, _Traits,
using string _LIBCPP_AVAILABILITY_PMR = basic_string<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using wstring _LIBCPP_AVAILABILITY_PMR = basic_string<wchar_t>;
# endif
@@ -80,7 +80,7 @@ using u32string _LIBCPP_AVAILABILITY_PMR = basic_string<char32_t>;
// clang-format off
template <class _CharT, class _Traits, class _Allocator>
class _LIBCPP_PREFERRED_NAME(string)
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_PREFERRED_NAME(wstring)
#endif
#if _LIBCPP_HAS_CHAR8_T
@@ -90,7 +90,7 @@ class _LIBCPP_PREFERRED_NAME(string)
_LIBCPP_PREFERRED_NAME(u32string)
#if _LIBCPP_STD_VER >= 17
_LIBCPP_PREFERRED_NAME(pmr::string)
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_PREFERRED_NAME(pmr::wstring)
# endif
# if _LIBCPP_HAS_CHAR8_T
diff --git a/libcxx/include/__fwd/string_view.h b/libcxx/include/__fwd/string_view.h
index e1acd87..b848cb7 100644
--- a/libcxx/include/__fwd/string_view.h
+++ b/libcxx/include/__fwd/string_view.h
@@ -28,14 +28,14 @@ typedef basic_string_view<char8_t> u8string_view;
#endif
typedef basic_string_view<char16_t> u16string_view;
typedef basic_string_view<char32_t> u32string_view;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
typedef basic_string_view<wchar_t> wstring_view;
#endif
// clang-format off
template <class _CharT, class _Traits>
class _LIBCPP_PREFERRED_NAME(string_view)
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_PREFERRED_NAME(wstring_view)
#endif
#if _LIBCPP_HAS_CHAR8_T
diff --git a/libcxx/include/__locale b/libcxx/include/__locale
index 5fb0c19..e601db0 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -27,7 +27,7 @@
#include <cstddef>
#include <cstring>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <cwchar>
#else
# include <__std_mbstate_t.h>
@@ -236,7 +236,7 @@ long collate<_CharT>::do_hash(const char_type* __lo, const char_type* __hi) cons
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>;
#endif
@@ -263,7 +263,7 @@ protected:
string_type do_transform(const char_type* __lo, const char_type* __hi) const override;
};
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI collate_byname<wchar_t> : public collate<wchar_t> {
locale_t __l_;
@@ -449,7 +449,7 @@ public:
template <class _CharT>
class _LIBCPP_TEMPLATE_VIS ctype;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype<wchar_t> : public locale::facet, public ctype_base {
public:
@@ -514,7 +514,7 @@ protected:
virtual const char_type*
do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const;
};
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype<char> : public locale::facet, public ctype_base {
@@ -630,7 +630,7 @@ protected:
const char_type* do_tolower(char_type* __low, const char_type* __high) const override;
};
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype_byname<wchar_t> : public ctype<wchar_t> {
locale_t __l_;
@@ -655,7 +655,7 @@ protected:
const char_type*
do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const override;
};
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
template <class _CharT>
inline _LIBCPP_HIDE_FROM_ABI bool isspace(_CharT __c, const locale& __loc) {
@@ -821,7 +821,7 @@ protected:
// template <> class codecvt<wchar_t, char, mbstate_t>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI codecvt<wchar_t, char, mbstate_t> : public locale::facet, public codecvt_base {
locale_t __l_;
@@ -900,7 +900,7 @@ protected:
virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
virtual int do_max_length() const _NOEXCEPT;
};
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
// template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20
@@ -1248,7 +1248,7 @@ codecvt_byname<_InternT, _ExternT, _StateT>::~codecvt_byname() {}
_LIBCPP_SUPPRESS_DEPRECATED_POP
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>;
#endif
extern template class _LIBCPP_DEPRECATED_IN_CXX20
@@ -1438,7 +1438,7 @@ protected:
string __grouping_;
};
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct<wchar_t> : public locale::facet {
public:
@@ -1467,7 +1467,7 @@ protected:
char_type __thousands_sep_;
string __grouping_;
};
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
// template <class charT> class numpunct_byname
@@ -1490,7 +1490,7 @@ private:
void __init(const char*);
};
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct_byname<wchar_t> : public numpunct<wchar_t> {
public:
@@ -1506,7 +1506,7 @@ protected:
private:
void __init(const char*);
};
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__locale_dir/locale_base_api.h b/libcxx/include/__locale_dir/locale_base_api.h
index bef10db1..dbb4a02 100644
--- a/libcxx/include/__locale_dir/locale_base_api.h
+++ b/libcxx/include/__locale_dir/locale_base_api.h
@@ -21,7 +21,7 @@
# include <__locale_dir/locale_base_api/openbsd.h>
#elif defined(__Fuchsia__)
# include <__locale_dir/locale_base_api/fuchsia.h>
-#elif defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC)
+#elif defined(__wasi__) || _LIBCPP_HAS_MUSL_LIBC
# include <__locale_dir/locale_base_api/musl.h>
#elif defined(__APPLE__)
# include <__locale_dir/locale_base_api/apple.h>
diff --git a/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h b/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h
index 52f31fb..e6ada58 100644
--- a/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h
+++ b/libcxx/include/__locale_dir/locale_base_api/bsd_locale_defaults.h
@@ -17,7 +17,7 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <wchar.h>
#endif
@@ -40,7 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
inline _LIBCPP_HIDE_FROM_ABI decltype(MB_CUR_MAX) __libcpp_mb_cur_max_l(locale_t __loc) { return MB_CUR_MAX_L(__loc); }
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI wint_t __libcpp_btowc_l(int __c, locale_t __loc) { return ::btowc_l(__c, __loc); }
inline _LIBCPP_HIDE_FROM_ABI int __libcpp_wctob_l(wint_t __c, locale_t __loc) { return ::wctob_l(__c, __loc); }
@@ -71,11 +71,11 @@ inline _LIBCPP_HIDE_FROM_ABI int __libcpp_mbtowc_l(wchar_t* __pwc, const char* _
inline _LIBCPP_HIDE_FROM_ABI size_t __libcpp_mbrlen_l(const char* __s, size_t __n, mbstate_t* __ps, locale_t __loc) {
return ::mbrlen_l(__s, __n, __ps, __loc);
}
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI lconv* __libcpp_localeconv_l(locale_t& __loc) { return ::localeconv_l(__loc); }
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI size_t
__libcpp_mbsrtowcs_l(wchar_t* __dest, const char** __src, size_t __len, mbstate_t* __ps, locale_t __loc) {
return ::mbsrtowcs_l(__dest, __src, __len, __ps, __loc);
diff --git a/libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h b/libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h
index a8f45a9..d514bdf 100644
--- a/libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h
+++ b/libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <cwchar>
#endif
@@ -35,7 +35,7 @@ inline _LIBCPP_HIDE_FROM_ABI decltype(MB_CUR_MAX) __libcpp_mb_cur_max_l(locale_t
return MB_CUR_MAX;
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI wint_t __libcpp_btowc_l(int __c, locale_t __l) {
__locale_guard __current(__l);
return btowc(__c);
@@ -78,14 +78,14 @@ inline _LIBCPP_HIDE_FROM_ABI size_t __libcpp_mbrlen_l(const char* __s, size_t __
__locale_guard __current(__l);
return mbrlen(__s, __n, __ps);
}
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI lconv* __libcpp_localeconv_l(locale_t& __l) {
__locale_guard __current(__l);
return localeconv();
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI size_t
__libcpp_mbsrtowcs_l(wchar_t* __dest, const char** __src, size_t __len, mbstate_t* __ps, locale_t __l) {
__locale_guard __current(__l);
diff --git a/libcxx/include/__mbstate_t.h b/libcxx/include/__mbstate_t.h
index bfa6d61..e013384 100644
--- a/libcxx/include/__mbstate_t.h
+++ b/libcxx/include/__mbstate_t.h
@@ -35,7 +35,7 @@
# define __CORRECT_ISO_CPP_WCHAR_H_PROTO
#endif
-#if defined(_LIBCPP_HAS_MUSL_LIBC)
+#if _LIBCPP_HAS_MUSL_LIBC
# define __NEED_mbstate_t
# include <bits/alltypes.h>
# undef __NEED_mbstate_t
@@ -43,7 +43,7 @@
# include <bits/types/mbstate_t.h> // works on most Unixes
#elif __has_include(<sys/_types/_mbstate_t.h>)
# include <sys/_types/_mbstate_t.h> // works on Darwin
-#elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) && __has_include_next(<wchar.h>)
+#elif _LIBCPP_HAS_WIDE_CHARACTERS && __has_include_next(<wchar.h>)
# include_next <wchar.h> // fall back to the C standard provider of mbstate_t
#elif __has_include_next(<uchar.h>)
# include_next <uchar.h> // <uchar.h> is also required to make mbstate_t visible
diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 1527c01..5a84c2ce 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -83,7 +83,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _ValueType>
inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_relaxed_load(_ValueType const* __value) {
-#if !defined(_LIBCPP_HAS_NO_THREADS) && defined(__ATOMIC_RELAXED) && \
+#if _LIBCPP_HAS_THREADS && defined(__ATOMIC_RELAXED) && \
(__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))
return __atomic_load_n(__value, __ATOMIC_RELAXED);
#else
@@ -93,7 +93,7 @@ inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_relaxed_load(_ValueType const*
template <class _ValueType>
inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_acquire_load(_ValueType const* __value) {
-#if !defined(_LIBCPP_HAS_NO_THREADS) && defined(__ATOMIC_ACQUIRE) && \
+#if _LIBCPP_HAS_THREADS && defined(__ATOMIC_ACQUIRE) && \
(__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))
return __atomic_load_n(__value, __ATOMIC_ACQUIRE);
#else
@@ -103,7 +103,7 @@ inline _LIBCPP_HIDE_FROM_ABI _ValueType __libcpp_acquire_load(_ValueType const*
template <class _Tp>
inline _LIBCPP_HIDE_FROM_ABI _Tp __libcpp_atomic_refcount_increment(_Tp& __t) _NOEXCEPT {
-#if _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT && !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT && _LIBCPP_HAS_THREADS
return __atomic_add_fetch(&__t, 1, __ATOMIC_RELAXED);
#else
return __t += 1;
@@ -112,7 +112,7 @@ inline _LIBCPP_HIDE_FROM_ABI _Tp __libcpp_atomic_refcount_increment(_Tp& __t) _N
template <class _Tp>
inline _LIBCPP_HIDE_FROM_ABI _Tp __libcpp_atomic_refcount_decrement(_Tp& __t) _NOEXCEPT {
-#if _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT && !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT && _LIBCPP_HAS_THREADS
return __atomic_add_fetch(&__t, -1, __ATOMIC_ACQ_REL);
#else
return __t -= 1;
@@ -1584,7 +1584,7 @@ template <class _CharT, class _Traits, class _Yp>
inline _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
class _LIBCPP_EXPORTED_FROM_ABI __sp_mut {
void* __lx_;
@@ -1686,7 +1686,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_weak_explicit(
return std::atomic_compare_exchange_weak(__p, __v, __w);
}
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__memory_resource/synchronized_pool_resource.h b/libcxx/include/__memory_resource/synchronized_pool_resource.h
index 2679afc..6384564 100644
--- a/libcxx/include/__memory_resource/synchronized_pool_resource.h
+++ b/libcxx/include/__memory_resource/synchronized_pool_resource.h
@@ -48,7 +48,7 @@ public:
synchronized_pool_resource& operator=(const synchronized_pool_resource&) = delete;
_LIBCPP_HIDE_FROM_ABI void release() {
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_THREADS
unique_lock<mutex> __lk(__mut_);
# endif
__unsync_.release();
@@ -60,14 +60,14 @@ public:
protected:
_LIBCPP_HIDE_FROM_ABI_VIRTUAL void* do_allocate(size_t __bytes, size_t __align) override {
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_THREADS
unique_lock<mutex> __lk(__mut_);
# endif
return __unsync_.allocate(__bytes, __align);
}
_LIBCPP_HIDE_FROM_ABI_VIRTUAL void do_deallocate(void* __p, size_t __bytes, size_t __align) override {
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_THREADS
unique_lock<mutex> __lk(__mut_);
# endif
return __unsync_.deallocate(__p, __bytes, __align);
@@ -76,7 +76,7 @@ protected:
bool do_is_equal(const memory_resource& __other) const noexcept override; // key function
private:
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_THREADS
mutex __mut_;
# endif
unsynchronized_pool_resource __unsync_;
diff --git a/libcxx/include/__mutex/mutex.h b/libcxx/include/__mutex/mutex.h
index 9c0c9ad..3173202 100644
--- a/libcxx/include/__mutex/mutex.h
+++ b/libcxx/include/__mutex/mutex.h
@@ -17,7 +17,7 @@
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -48,6 +48,6 @@ static_assert(is_nothrow_default_constructible<mutex>::value, "the default const
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
#endif // _LIBCPP___MUTEX_MUTEX_H
diff --git a/libcxx/include/__ostream/basic_ostream.h b/libcxx/include/__ostream/basic_ostream.h
index fc72247..c37566d 100644
--- a/libcxx/include/__ostream/basic_ostream.h
+++ b/libcxx/include/__ostream/basic_ostream.h
@@ -11,7 +11,7 @@
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__exception/operations.h>
# include <__memory/shared_ptr.h>
@@ -801,7 +801,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x) {
# if _LIBCPP_STD_VER >= 20
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _Traits>
basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;
@@ -820,7 +820,7 @@ basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, co
template <class _Traits>
basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) = delete;
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
# if _LIBCPP_HAS_CHAR8_T
template <class _Traits>
@@ -851,7 +851,7 @@ basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const ch
# endif // _LIBCPP_STD_VER >= 20
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
# endif
@@ -859,6 +859,6 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP___OSTREAM_BASIC_OSTREAM_H
diff --git a/libcxx/include/__ostream/print.h b/libcxx/include/__ostream/print.h
index 82eb93a..eb423334 100644
--- a/libcxx/include/__ostream/print.h
+++ b/libcxx/include/__ostream/print.h
@@ -11,7 +11,7 @@
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__fwd/ostream.h>
# include <__iterator/ostreambuf_iterator.h>
@@ -94,7 +94,7 @@ _LIBCPP_HIDE_FROM_ABI inline void vprint_nonunicode(ostream& __os, string_view _
// is determined in the same way as the print(FILE*, ...) overloads.
_LIBCPP_EXPORTED_FROM_ABI FILE* __get_ostream_file(ostream& __os);
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
_LIBCPP_HIDE_FROM_ABI void __vprint_unicode(ostream& __os, string_view __fmt, format_args __args, bool __write_nl) {
# if _LIBCPP_AVAILABILITY_HAS_PRINT == 0
@@ -122,7 +122,7 @@ _LIBCPP_HIDE_FROM_ABI void __vprint_unicode(ostream& __os, string_view __fmt, fo
if (__s) {
# ifndef _LIBCPP_WIN32API
__print::__vprint_unicode_posix(__file, __fmt, __args, __write_nl, true);
-# elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+# elif _LIBCPP_HAS_WIDE_CHARACTERS
__print::__vprint_unicode_windows(__file, __fmt, __args, __write_nl, true);
# else
# error "Windows builds with wchar_t disabled are not supported."
@@ -141,23 +141,23 @@ template <class = void> // TODO PRINT template or availability markup fires too
_LIBCPP_HIDE_FROM_ABI inline void vprint_unicode(ostream& __os, string_view __fmt, format_args __args) {
std::__vprint_unicode(__os, __fmt, __args, false);
}
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI void print(ostream& __os, format_string<_Args...> __fmt, _Args&&... __args) {
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
if constexpr (__print::__use_unicode_execution_charset)
std::__vprint_unicode(__os, __fmt.get(), std::make_format_args(__args...), false);
else
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), false);
-# else // _LIBCPP_HAS_NO_UNICODE
+# else // _LIBCPP_HAS_UNICODE
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), false);
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
}
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI void println(ostream& __os, format_string<_Args...> __fmt, _Args&&... __args) {
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
// Note the wording in the Standard is inefficient. The output of
// std::format is a std::string which is then copied. This solution
// just appends a newline at the end of the output.
@@ -165,9 +165,9 @@ _LIBCPP_HIDE_FROM_ABI void println(ostream& __os, format_string<_Args...> __fmt,
std::__vprint_unicode(__os, __fmt.get(), std::make_format_args(__args...), true);
else
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), true);
-# else // _LIBCPP_HAS_NO_UNICODE
+# else // _LIBCPP_HAS_UNICODE
std::__vprint_nonunicode(__os, __fmt.get(), std::make_format_args(__args...), true);
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
}
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
@@ -179,6 +179,6 @@ _LIBCPP_HIDE_FROM_ABI inline void println(ostream& __os) {
_LIBCPP_END_NAMESPACE_STD
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP___OSTREAM_PRINT_H
diff --git a/libcxx/include/__random/random_device.h b/libcxx/include/__random/random_device.h
index 5240794..33ec585c 100644
--- a/libcxx/include/__random/random_device.h
+++ b/libcxx/include/__random/random_device.h
@@ -21,7 +21,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_RANDOM_DEVICE)
+#if _LIBCPP_HAS_RANDOM_DEVICE
class _LIBCPP_EXPORTED_FROM_ABI random_device {
# ifdef _LIBCPP_USING_DEV_RANDOM
@@ -72,7 +72,7 @@ public:
void operator=(const random_device&) = delete;
};
-#endif // !_LIBCPP_HAS_NO_RANDOM_DEVICE
+#endif // _LIBCPP_HAS_RANDOM_DEVICE
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__ranges/istream_view.h b/libcxx/include/__ranges/istream_view.h
index 1820ef2..ab05cb6 100644
--- a/libcxx/include/__ranges/istream_view.h
+++ b/libcxx/include/__ranges/istream_view.h
@@ -99,7 +99,7 @@ private:
template <class _Val>
using istream_view = basic_istream_view<_Val, char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _Val>
using wistream_view = basic_istream_view<_Val, wchar_t>;
# endif
diff --git a/libcxx/include/__stop_token/atomic_unique_lock.h b/libcxx/include/__stop_token/atomic_unique_lock.h
index 8fb70a4..a698260 100644
--- a/libcxx/include/__stop_token/atomic_unique_lock.h
+++ b/libcxx/include/__stop_token/atomic_unique_lock.h
@@ -133,7 +133,7 @@ private:
_LIBCPP_HIDE_FROM_ABI static constexpr auto __set_locked_bit = [](_State __state) { return __state | _LockedBit; };
};
-#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__stop_token/stop_callback.h b/libcxx/include/__stop_token/stop_callback.h
index 8d7167a..a4d7a29 100644
--- a/libcxx/include/__stop_token/stop_callback.h
+++ b/libcxx/include/__stop_token/stop_callback.h
@@ -31,7 +31,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
template <class _Callback>
class _LIBCPP_AVAILABILITY_SYNC stop_callback : private __stop_callback_base {
@@ -93,7 +93,7 @@ private:
template <class _Callback>
_LIBCPP_AVAILABILITY_SYNC stop_callback(stop_token, _Callback) -> stop_callback<_Callback>;
-#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__stop_token/stop_source.h b/libcxx/include/__stop_token/stop_source.h
index 7243856..85d67ef 100644
--- a/libcxx/include/__stop_token/stop_source.h
+++ b/libcxx/include/__stop_token/stop_source.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
struct nostopstate_t {
explicit nostopstate_t() = default;
@@ -84,7 +84,7 @@ private:
__intrusive_shared_ptr<__stop_state> __state_;
};
-#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__stop_token/stop_state.h b/libcxx/include/__stop_token/stop_state.h
index b0eed13..84dc208 100644
--- a/libcxx/include/__stop_token/stop_state.h
+++ b/libcxx/include/__stop_token/stop_state.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
struct __stop_callback_base : __intrusive_node_base<__stop_callback_base> {
using __callback_fn_t = void(__stop_callback_base*) noexcept;
@@ -229,7 +229,7 @@ struct __intrusive_shared_ptr_traits<__stop_state> {
}
};
-#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__stop_token/stop_token.h b/libcxx/include/__stop_token/stop_token.h
index b256973..178b172 100644
--- a/libcxx/include/__stop_token/stop_token.h
+++ b/libcxx/include/__stop_token/stop_token.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
class _LIBCPP_AVAILABILITY_SYNC stop_token {
public:
@@ -56,7 +56,7 @@ private:
_LIBCPP_HIDE_FROM_ABI explicit stop_token(const __intrusive_shared_ptr<__stop_state>& __state) : __state_(__state) {}
};
-#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h
index f59764b..9574cde 100644
--- a/libcxx/include/__string/char_traits.h
+++ b/libcxx/include/__string/char_traits.h
@@ -29,7 +29,7 @@
#include <cstdio>
#include <iosfwd>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <cwchar> // for wmemcpy
#endif
@@ -234,7 +234,7 @@ struct __char_traits_base {
// char_traits<wchar_t>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t> : __char_traits_base<wchar_t, wint_t, static_cast<wint_t>(WEOF)> {
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 int
@@ -255,7 +255,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t> : __char_traits_base<wchar_t, w
return std::__constexpr_wmemchr(__s, __a, __n);
}
};
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
#if _LIBCPP_HAS_CHAR8_T
diff --git a/libcxx/include/__support/xlocale/__posix_l_fallback.h b/libcxx/include/__support/xlocale/__posix_l_fallback.h
index c835891..cd1d52b 100644
--- a/libcxx/include/__support/xlocale/__posix_l_fallback.h
+++ b/libcxx/include/__support/xlocale/__posix_l_fallback.h
@@ -20,7 +20,7 @@
#include <string.h>
#include <time.h>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <wchar.h>
# include <wctype.h>
#endif
@@ -37,7 +37,7 @@ inline _LIBCPP_HIDE_FROM_ABI int toupper_l(int __c, locale_t) { return ::toupper
inline _LIBCPP_HIDE_FROM_ABI int tolower_l(int __c, locale_t) { return ::tolower(__c); }
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI int iswalpha_l(wint_t __c, locale_t) { return ::iswalpha(__c); }
inline _LIBCPP_HIDE_FROM_ABI int iswblank_l(wint_t __c, locale_t) { return ::iswblank(__c); }
@@ -61,7 +61,7 @@ inline _LIBCPP_HIDE_FROM_ABI int iswxdigit_l(wint_t __c, locale_t) { return ::is
inline _LIBCPP_HIDE_FROM_ABI wint_t towupper_l(wint_t __c, locale_t) { return ::towupper(__c); }
inline _LIBCPP_HIDE_FROM_ABI wint_t towlower_l(wint_t __c, locale_t) { return ::towlower(__c); }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI int strcoll_l(const char* __s1, const char* __s2, locale_t) {
return ::strcoll(__s1, __s2);
@@ -76,7 +76,7 @@ strftime_l(char* __s, size_t __max, const char* __format, const struct tm* __tm,
return ::strftime(__s, __max, __format, __tm);
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI int wcscoll_l(const wchar_t* __ws1, const wchar_t* __ws2, locale_t) {
return ::wcscoll(__ws1, __ws2);
}
@@ -84,6 +84,6 @@ inline _LIBCPP_HIDE_FROM_ABI int wcscoll_l(const wchar_t* __ws1, const wchar_t*
inline _LIBCPP_HIDE_FROM_ABI size_t wcsxfrm_l(wchar_t* __dest, const wchar_t* __src, size_t __n, locale_t) {
return ::wcsxfrm(__dest, __src, __n);
}
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
#endif // _LIBCPP___SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
diff --git a/libcxx/include/__support/xlocale/__strtonum_fallback.h b/libcxx/include/__support/xlocale/__strtonum_fallback.h
index b7eef52..5275aea 100644
--- a/libcxx/include/__support/xlocale/__strtonum_fallback.h
+++ b/libcxx/include/__support/xlocale/__strtonum_fallback.h
@@ -18,7 +18,7 @@
#include <__config>
#include <stdlib.h>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <wchar.h>
#endif
diff --git a/libcxx/include/__thread/formatter.h b/libcxx/include/__thread/formatter.h
index 9b54036..dacf4ce 100644
--- a/libcxx/include/__thread/formatter.h
+++ b/libcxx/include/__thread/formatter.h
@@ -31,7 +31,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-# ifndef _LIBCPP_HAS_NO_THREADS
+# if _LIBCPP_HAS_THREADS
template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS formatter<__thread_id, _CharT> {
@@ -71,7 +71,7 @@ public:
__format_spec::__parser<_CharT> __parser_{.__alignment_ = __format_spec::__alignment::__right};
};
-# endif // !_LIBCPP_HAS_NO_THREADS
+# endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__thread/id.h b/libcxx/include/__thread/id.h
index 6db0ccb..75c3b34 100644
--- a/libcxx/include/__thread/id.h
+++ b/libcxx/include/__thread/id.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
class _LIBCPP_EXPORTED_FROM_ABI __thread_id;
namespace this_thread {
@@ -114,7 +114,7 @@ inline _LIBCPP_HIDE_FROM_ABI __thread_id get_id() _NOEXCEPT { return __libcpp_th
} // namespace this_thread
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__thread/jthread.h b/libcxx/include/__thread/jthread.h
index 9f3d41d..7289b83 100644
--- a/libcxx/include/__thread/jthread.h
+++ b/libcxx/include/__thread/jthread.h
@@ -32,7 +32,7 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -129,7 +129,7 @@ private:
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_THREADS
_LIBCPP_POP_MACROS
diff --git a/libcxx/include/__thread/support.h b/libcxx/include/__thread/support.h
index 92f1c44..50a18da 100644
--- a/libcxx/include/__thread/support.h
+++ b/libcxx/include/__thread/support.h
@@ -104,20 +104,20 @@ _LIBCPP_END_NAMESPACE_STD
*/
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
-# if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+# if _LIBCPP_HAS_THREAD_API_EXTERNAL
# include <__thread/support/external.h>
-# elif defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+# elif _LIBCPP_HAS_THREAD_API_PTHREAD
# include <__thread/support/pthread.h>
-# elif defined(_LIBCPP_HAS_THREAD_API_C11)
+# elif _LIBCPP_HAS_THREAD_API_C11
# include <__thread/support/c11.h>
-# elif defined(_LIBCPP_HAS_THREAD_API_WIN32)
+# elif _LIBCPP_HAS_THREAD_API_WIN32
# include <__thread/support/windows.h>
# else
# error "No threading API was selected"
# endif
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
#endif // _LIBCPP___THREAD_SUPPORT_H
diff --git a/libcxx/include/__thread/this_thread.h b/libcxx/include/__thread/this_thread.h
index c7521c9..4df1377 100644
--- a/libcxx/include/__thread/this_thread.h
+++ b/libcxx/include/__thread/this_thread.h
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace this_thread {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
_LIBCPP_EXPORTED_FROM_ABI void sleep_for(const chrono::nanoseconds& __ns);
@@ -68,7 +68,7 @@ inline _LIBCPP_HIDE_FROM_ABI void sleep_until(const chrono::time_point<chrono::s
inline _LIBCPP_HIDE_FROM_ABI void yield() _NOEXCEPT { __libcpp_thread_yield(); }
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
} // namespace this_thread
diff --git a/libcxx/include/__thread/thread.h b/libcxx/include/__thread/thread.h
index 481a3f3..f417abc 100644
--- a/libcxx/include/__thread/thread.h
+++ b/libcxx/include/__thread/thread.h
@@ -25,7 +25,7 @@
#include <__utility/forward.h>
#include <tuple>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <locale>
# include <sstream>
#endif
@@ -39,7 +39,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
template <class _Tp>
class __thread_specific_ptr;
@@ -121,7 +121,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<__thread_id> : public __unary_function<__thread
}
};
-# ifndef _LIBCPP_HAS_NO_LOCALIZATION
+# if _LIBCPP_HAS_LOCALIZATION
template <class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id) {
@@ -146,7 +146,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id) {
__sstr << __id.__id_;
return __os << __sstr.str();
}
-# endif // _LIBCPP_HAS_NO_LOCALIZATION
+# endif // _LIBCPP_HAS_LOCALIZATION
class _LIBCPP_EXPORTED_FROM_ABI thread {
__libcpp_thread_t __t_;
@@ -255,7 +255,7 @@ thread::thread(_Fp __f) {
inline _LIBCPP_HIDE_FROM_ABI void swap(thread& __x, thread& __y) _NOEXCEPT { __x.swap(__y); }
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__thread/timed_backoff_policy.h b/libcxx/include/__thread/timed_backoff_policy.h
index 838c918..35a72eb6 100644
--- a/libcxx/include/__thread/timed_backoff_policy.h
+++ b/libcxx/include/__thread/timed_backoff_policy.h
@@ -12,7 +12,7 @@
#include <__config>
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
# include <__chrono/duration.h>
# include <__thread/support.h>
@@ -39,6 +39,6 @@ struct __libcpp_timed_backoff_policy {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
#endif // _LIBCPP___THREAD_TIMED_BACKOFF_POLICY_H
diff --git a/libcxx/include/__type_traits/is_integral.h b/libcxx/include/__type_traits/is_integral.h
index 6117872..763b6ac 100644
--- a/libcxx/include/__type_traits/is_integral.h
+++ b/libcxx/include/__type_traits/is_integral.h
@@ -25,7 +25,7 @@ template <> struct __libcpp_is_integral<bool> { enum { va
template <> struct __libcpp_is_integral<char> { enum { value = 1 }; };
template <> struct __libcpp_is_integral<signed char> { enum { value = 1 }; };
template <> struct __libcpp_is_integral<unsigned char> { enum { value = 1 }; };
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <> struct __libcpp_is_integral<wchar_t> { enum { value = 1 }; };
#endif
#if _LIBCPP_HAS_CHAR8_T
diff --git a/libcxx/include/__vector/vector.h b/libcxx/include/__vector/vector.h
index 876490a..6db202ef 100644
--- a/libcxx/include/__vector/vector.h
+++ b/libcxx/include/__vector/vector.h
@@ -1381,7 +1381,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 bool vector<_Tp, _Allocator>::__invariants() const
#if _LIBCPP_STD_VER >= 20
template <>
inline constexpr bool __format::__enable_insertable<vector<char>> = true;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
inline constexpr bool __format::__enable_insertable<vector<wchar_t>> = true;
# endif
diff --git a/libcxx/include/barrier b/libcxx/include/barrier
index 36c30c7..c7df0e9 100644
--- a/libcxx/include/barrier
+++ b/libcxx/include/barrier
@@ -47,7 +47,7 @@ namespace std
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
# include <__assert>
# include <__atomic/atomic_base.h>
@@ -294,7 +294,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index 0f42232..42da1b4 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -965,15 +965,14 @@ constexpr chrono::year operator ""y(unsigned lo
# include <__chrono/year_month_day.h>
# include <__chrono/year_month_weekday.h>
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
# include <__chrono/formatter.h>
# include <__chrono/ostream.h>
# include <__chrono/parser_std_format_spec.h>
# include <__chrono/statically_widen.h>
# endif
-# if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
- !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
# include <__chrono/leap_second.h>
# include <__chrono/time_zone.h>
# include <__chrono/time_zone_link.h>
@@ -1014,7 +1013,7 @@ constexpr chrono::year operator ""y(unsigned lo
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER == 20
# include <charconv>
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
# include <locale>
# include <ostream>
# endif
diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt
index 65cd752..8e0b525 100644
--- a/libcxx/include/codecvt
+++ b/libcxx/include/codecvt
@@ -73,7 +73,7 @@ enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode { consume_header = 4, generate_hea
template <class _Elem>
class __codecvt_utf8;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8<wchar_t> : public codecvt<wchar_t, char, mbstate_t> {
unsigned long __maxcode_;
@@ -112,7 +112,7 @@ protected:
int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
int do_max_length() const _NOEXCEPT override;
};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
@@ -203,7 +203,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _Elem, bool _LittleEndian>
class __codecvt_utf16;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<wchar_t, false> : public codecvt<wchar_t, char, mbstate_t> {
unsigned long __maxcode_;
@@ -281,7 +281,7 @@ protected:
int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
int do_max_length() const _NOEXCEPT override;
};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
@@ -448,7 +448,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
template <class _Elem>
class __codecvt_utf8_utf16;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8_utf16<wchar_t> : public codecvt<wchar_t, char, mbstate_t> {
unsigned long __maxcode_;
@@ -487,7 +487,7 @@ protected:
int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const override;
int do_max_length() const _NOEXCEPT override;
};
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <>
diff --git a/libcxx/include/complex b/libcxx/include/complex
index 15e4280..2dc6d29 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -266,7 +266,7 @@ template<class T> complex<T> tanh (const complex<T>&);
#include <cmath>
#include <version>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <sstream> // for std::basic_ostringstream
#endif
@@ -1322,7 +1322,7 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> tan(const complex<_Tp>& __x) {
return complex<_Tp>(__z.imag(), -__z.real());
}
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
template <class _Tp, class _CharT, class _Traits>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) {
@@ -1379,7 +1379,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) {
__s << '(' << __x.real() << ',' << __x.imag() << ')';
return __os << __s.str();
}
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCPP_HAS_LOCALIZATION
#if _LIBCPP_STD_VER >= 26
diff --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable
index 229a2ce..f894407 100644
--- a/libcxx/include/condition_variable
+++ b/libcxx/include/condition_variable
@@ -140,7 +140,7 @@ public:
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -347,7 +347,7 @@ _LIBCPP_EXPORTED_FROM_ABI void notify_all_at_thread_exit(condition_variable&, un
_LIBCPP_END_NAMESPACE_STD
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
_LIBCPP_POP_MACROS
diff --git a/libcxx/include/cstdlib b/libcxx/include/cstdlib
index 1ecdd3a..be0d9b8 100644
--- a/libcxx/include/cstdlib
+++ b/libcxx/include/cstdlib
@@ -135,7 +135,7 @@ using ::div _LIBCPP_USING_IF_EXISTS;
using ::ldiv _LIBCPP_USING_IF_EXISTS;
using ::lldiv _LIBCPP_USING_IF_EXISTS;
using ::mblen _LIBCPP_USING_IF_EXISTS;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
using ::mbtowc _LIBCPP_USING_IF_EXISTS;
using ::wctomb _LIBCPP_USING_IF_EXISTS;
using ::mbstowcs _LIBCPP_USING_IF_EXISTS;
diff --git a/libcxx/include/deque b/libcxx/include/deque
index 0ded69c..55d0bf9 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -2604,7 +2604,7 @@ erase_if(deque<_Tp, _Allocator>& __c, _Predicate __pred) {
template <>
inline constexpr bool __format::__enable_insertable<std::deque<char>> = true;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
inline constexpr bool __format::__enable_insertable<std::deque<wchar_t>> = true;
# endif
diff --git a/libcxx/include/format b/libcxx/include/format
index 449e6f0..82a2e32 100644
--- a/libcxx/include/format
+++ b/libcxx/include/format
@@ -252,7 +252,7 @@ namespace std {
# include <string_view>
# include <tuple>
-# if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+# if _LIBCPP_HAS_WIDE_CHARACTERS
# include <cwchar>
# endif
#endif
diff --git a/libcxx/include/fstream b/libcxx/include/fstream
index dce0efc..e3b9abb 100644
--- a/libcxx/include/fstream
+++ b/libcxx/include/fstream
@@ -217,7 +217,7 @@ _LIBCPP_PUSH_MACROS
# define _LIBCPP_HAS_OFF_T_FUNCTIONS 0
#endif
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -1562,7 +1562,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_filebuf<char>;
_LIBCPP_END_NAMESPACE_STD
-#endif // !defined(_LIBCPP_HAS_NO_FILESYSTEM) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
_LIBCPP_POP_MACROS
diff --git a/libcxx/include/future b/libcxx/include/future
index f16f423..67d9b43 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -364,7 +364,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
# include <__assert>
# include <__chrono/duration.h>
@@ -2059,7 +2059,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
# include <chrono>
diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip
index 538fc41..bc3f860 100644
--- a/libcxx/include/iomanip
+++ b/libcxx/include/iomanip
@@ -44,7 +44,7 @@ template <class charT, class traits, class Allocator>
#include <__config>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__ostream/basic_ostream.h>
# include <ios>
@@ -544,6 +544,6 @@ quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _C
_LIBCPP_END_NAMESPACE_STD
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP_IOMANIP
diff --git a/libcxx/include/ios b/libcxx/include/ios
index 546c546..2eb32f29 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -213,7 +213,7 @@ storage-class-specifier const error_category& iostream_category() noexcept;
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__fwd/ios.h>
# include <__ios/fpos.h>
@@ -397,7 +397,7 @@ private:
size_t __event_cap_;
// TODO(EricWF): Enable this for both Clang and GCC. Currently it is only
// enabled with clang.
-# if defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_C_ATOMIC_IMP && _LIBCPP_HAS_THREADS
static atomic<int> __xindex_;
# else
static int __xindex_;
@@ -744,7 +744,7 @@ inline _LIBCPP_HIDE_FROM_ABI void basic_ios<_CharT, _Traits>::set_rdbuf(basic_st
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
# endif
@@ -872,7 +872,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
diff --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd
index 9079ce2..5e777c6 100644
--- a/libcxx/include/iosfwd
+++ b/libcxx/include/iosfwd
@@ -131,7 +131,7 @@ class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
template <class _State>
class _LIBCPP_TEMPLATE_VIS fpos;
typedef fpos<mbstate_t> streampos;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
typedef fpos<mbstate_t> wstreampos;
#endif
#if _LIBCPP_HAS_CHAR8_T
@@ -146,7 +146,7 @@ template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator =
class basic_syncbuf;
using syncbuf = basic_syncbuf<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using wsyncbuf = basic_syncbuf<wchar_t>;
# endif
@@ -154,7 +154,7 @@ template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator =
class basic_osyncstream;
using osyncstream = basic_osyncstream<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using wosyncstream = basic_osyncstream<wchar_t>;
# endif
diff --git a/libcxx/include/iostream b/libcxx/include/iostream
index 5df45c6..d3ecc6c 100644
--- a/libcxx/include/iostream
+++ b/libcxx/include/iostream
@@ -55,7 +55,7 @@ extern _LIBCPP_EXPORTED_FROM_ABI ostream cout;
extern _LIBCPP_EXPORTED_FROM_ABI ostream cerr;
extern _LIBCPP_EXPORTED_FROM_ABI ostream clog;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
extern _LIBCPP_EXPORTED_FROM_ABI wistream wcin;
extern _LIBCPP_EXPORTED_FROM_ABI wostream wcout;
extern _LIBCPP_EXPORTED_FROM_ABI wostream wcerr;
diff --git a/libcxx/include/istream b/libcxx/include/istream
index 45ca953..0d6d688 100644
--- a/libcxx/include/istream
+++ b/libcxx/include/istream
@@ -160,7 +160,7 @@ template <class Stream, class T>
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__fwd/istream.h>
# include <__iterator/istreambuf_iterator.h>
@@ -1363,14 +1363,14 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x) {
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>;
# endif
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>;
_LIBCPP_END_NAMESPACE_STD
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <concepts>
diff --git a/libcxx/include/latch b/libcxx/include/latch
index 92dadf6..90cca27 100644
--- a/libcxx/include/latch
+++ b/libcxx/include/latch
@@ -42,7 +42,7 @@ namespace std
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
# include <__assert>
# include <__atomic/atomic_base.h>
@@ -120,7 +120,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
diff --git a/libcxx/include/list b/libcxx/include/list
index 9530275..3b8399e 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -1710,7 +1710,7 @@ erase(list<_Tp, _Allocator>& __c, const _Up& __v) {
template <>
inline constexpr bool __format::__enable_insertable<std::list<char>> = true;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
inline constexpr bool __format::__enable_insertable<std::list<wchar_t>> = true;
# endif
diff --git a/libcxx/include/locale b/libcxx/include/locale
index 4706515..b77a724 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -189,7 +189,7 @@ template <class charT> class messages_byname;
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__algorithm/copy.h>
# include <__algorithm/equal.h>
@@ -580,7 +580,7 @@ int __num_get<_CharT>::__stage2_float_loop(
}
extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>;
# endif
@@ -1051,7 +1051,7 @@ _InputIterator num_get<_CharT, _InputIterator>::do_get(
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<wchar_t>;
# endif
@@ -1169,7 +1169,7 @@ void __num_put<_CharT>::__widen_and_group_float(
}
extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>;
# endif
@@ -1456,7 +1456,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob, char_ty
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<wchar_t>;
# endif
@@ -1523,7 +1523,7 @@ _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__x() const;
template <>
_LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__X() const;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
_LIBCPP_EXPORTED_FROM_ABI const wstring* __time_get_c_storage<wchar_t>::__weeks() const;
template <>
@@ -1992,7 +1992,7 @@ _InputIterator time_get<_CharT, _InputIterator>::do_get(
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<wchar_t>;
# endif
@@ -2052,7 +2052,7 @@ private:
/**/
_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(char)
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(wchar_t)
# endif
# undef _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION
@@ -2088,7 +2088,7 @@ private:
};
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<wchar_t>;
# endif
@@ -2101,7 +2101,7 @@ protected:
__time_put(const string& __nm);
~__time_put();
void __do_put(char* __nb, char*& __ne, const tm* __tm, char __fmt, char __mod) const;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
void __do_put(wchar_t* __wb, wchar_t*& __we, const tm* __tm, char __fmt, char __mod) const;
# endif
};
@@ -2177,7 +2177,7 @@ _OutputIterator time_put<_CharT, _OutputIterator>::do_put(
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>;
# endif
@@ -2195,7 +2195,7 @@ protected:
};
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<wchar_t>;
# endif
@@ -2262,7 +2262,7 @@ const bool moneypunct<_CharT, _International>::intl;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, false>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, true>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, false>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, true>;
# endif
@@ -2320,7 +2320,7 @@ _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<char, true>::init(const char*);
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
_LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<wchar_t, false>::init(const char*);
template <>
@@ -2388,7 +2388,7 @@ void __money_get<_CharT>::__gather_info(
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>;
# endif
@@ -2698,7 +2698,7 @@ _InputIterator money_get<_CharT, _InputIterator>::do_get(
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<wchar_t>;
# endif
@@ -2876,7 +2876,7 @@ void __money_put<_CharT>::__format(
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>;
# endif
@@ -3022,7 +3022,7 @@ _OutputIterator money_put<_CharT, _OutputIterator>::do_put(
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<wchar_t>;
# endif
@@ -3107,7 +3107,7 @@ void messages<_CharT>::do_close(catalog __c) const {
}
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>;
# endif
@@ -3126,7 +3126,7 @@ protected:
};
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<wchar_t>;
# endif
@@ -3745,7 +3745,7 @@ _LIBCPP_POP_MACROS
// NOLINTEND(libcpp-robust-against-adl)
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index 427fce5..60a7c99 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -214,7 +214,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
class _LIBCPP_EXPORTED_FROM_ABI recursive_mutex {
__libcpp_recursive_mutex_t __m_;
@@ -491,7 +491,7 @@ private:
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(scoped_lock);
# endif // _LIBCPP_STD_VER >= 17
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/ostream b/libcxx/include/ostream
index 8374288..a58ac9b 100644
--- a/libcxx/include/ostream
+++ b/libcxx/include/ostream
@@ -174,7 +174,7 @@ void vprint_nonunicode(ostream& os, string_view fmt, format_args args);
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__ostream/basic_ostream.h>
@@ -188,7 +188,7 @@ void vprint_nonunicode(ostream& os, string_view fmt, format_args args);
# pragma GCC system_header
# endif
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
diff --git a/libcxx/include/print b/libcxx/include/print
index 2798a6b..6241534 100644
--- a/libcxx/include/print
+++ b/libcxx/include/print
@@ -54,7 +54,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#ifdef _LIBCPP_WIN32API
_LIBCPP_EXPORTED_FROM_ABI bool __is_windows_terminal(FILE* __stream);
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
// A wrapper for WriteConsoleW which is used to write to the Windows
// console. This function is in the dylib to avoid pulling in windows.h
// in the library headers. The function itself uses some private parts
@@ -65,14 +65,14 @@ _LIBCPP_EXPORTED_FROM_ABI bool __is_windows_terminal(FILE* __stream);
//
// Note the function is only implemented on the Windows platform.
_LIBCPP_EXPORTED_FROM_ABI void __write_to_windows_console(FILE* __stream, wstring_view __view);
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
#elif __has_include(<unistd.h>)
_LIBCPP_EXPORTED_FROM_ABI bool __is_posix_terminal(FILE* __stream);
#endif // _LIBCPP_WIN32API
#if _LIBCPP_STD_VER >= 23
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
// This is the code to transcode UTF-8 to UTF-16. This is used on
// Windows for the native Unicode API. The code is modeled to make it
// easier to extend to
@@ -90,7 +90,7 @@ namespace __unicode {
template <class _Tp>
concept __utf16_code_unit =
same_as<_Tp, char16_t>
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
|| same_as<_Tp, wchar_t>
# endif
;
@@ -102,7 +102,7 @@ concept __utf16_code_unit = same_as<_Tp, char16_t>;
template <class _Tp>
concept __utf32_code_unit =
same_as<_Tp, char32_t>
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
|| same_as<_Tp, wchar_t>
# endif
;
@@ -164,7 +164,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr _OutIt __transcode(_InIt __first, _InIt __last,
} // namespace __unicode
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
namespace __print {
@@ -184,7 +184,7 @@ namespace __print {
// (note at the time of writing Clang is hard-coded to UTF-8.)
//
-# ifdef _LIBCPP_HAS_NO_UNICODE
+# if !_LIBCPP_HAS_UNICODE
inline constexpr bool __use_unicode_execution_charset = false;
# elif defined(_MSVC_EXECUTION_CHARACTER_SET)
// This is the same test MSVC STL uses in their implementation of <print>
@@ -199,7 +199,7 @@ _LIBCPP_HIDE_FROM_ABI inline bool __is_terminal([[maybe_unused]] FILE* __stream)
// the behavior in the test. This is not part of the public API.
# ifdef _LIBCPP_TESTING_PRINT_IS_TERMINAL
return _LIBCPP_TESTING_PRINT_IS_TERMINAL(__stream);
-# elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0 || defined(_LIBCPP_HAS_NO_TERMINAL)
+# elif _LIBCPP_AVAILABILITY_HAS_PRINT == 0 || _LIBCPP_HAS_TERMINAL
return false;
# elif defined(_LIBCPP_WIN32API)
return std::__is_windows_terminal(__stream);
@@ -226,7 +226,7 @@ __vprint_nonunicode(FILE* __stream, string_view __fmt, format_args __args, bool
}
}
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
// Note these helper functions are mainly used to aid testing.
// On POSIX systems and Windows the output is no longer considered a
@@ -243,7 +243,7 @@ __vprint_unicode_posix(FILE* __stream, string_view __fmt, format_args __args, bo
__print::__vprint_nonunicode(__stream, __fmt, __args, __write_nl);
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
_LIBCPP_HIDE_FROM_ABI inline void
__vprint_unicode_windows(FILE* __stream, string_view __fmt, format_args __args, bool __write_nl, bool __is_terminal) {
@@ -281,7 +281,7 @@ __vprint_unicode_windows(FILE* __stream, string_view __fmt, format_args __args,
"__write_to_windows_console is not available.");
# endif
}
-# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
_LIBCPP_HIDE_FROM_ABI inline void
@@ -314,27 +314,27 @@ __vprint_unicode([[maybe_unused]] FILE* __stream,
# ifndef _LIBCPP_WIN32API
__print::__vprint_unicode_posix(__stream, __fmt, __args, __write_nl, __print::__is_terminal(__stream));
-# elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+# elif _LIBCPP_HAS_WIDE_CHARACTERS
__print::__vprint_unicode_windows(__stream, __fmt, __args, __write_nl, __print::__is_terminal(__stream));
# else
# error "Windows builds with wchar_t disabled are not supported."
# endif
}
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
} // namespace __print
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI void print(FILE* __stream, format_string<_Args...> __fmt, _Args&&... __args) {
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
if constexpr (__print::__use_unicode_execution_charset)
__print::__vprint_unicode(__stream, __fmt.get(), std::make_format_args(__args...), false);
else
__print::__vprint_nonunicode(__stream, __fmt.get(), std::make_format_args(__args...), false);
-# else // _LIBCPP_HAS_NO_UNICODE
+# else // _LIBCPP_HAS_UNICODE
__print::__vprint_nonunicode(__stream, __fmt.get(), std::make_format_args(__args...), false);
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
}
template <class... _Args>
@@ -344,7 +344,7 @@ _LIBCPP_HIDE_FROM_ABI void print(format_string<_Args...> __fmt, _Args&&... __arg
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI void println(FILE* __stream, format_string<_Args...> __fmt, _Args&&... __args) {
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
// Note the wording in the Standard is inefficient. The output of
// std::format is a std::string which is then copied. This solution
// just appends a newline at the end of the output.
@@ -352,9 +352,9 @@ _LIBCPP_HIDE_FROM_ABI void println(FILE* __stream, format_string<_Args...> __fmt
__print::__vprint_unicode(__stream, __fmt.get(), std::make_format_args(__args...), true);
else
__print::__vprint_nonunicode(__stream, __fmt.get(), std::make_format_args(__args...), true);
-# else // _LIBCPP_HAS_NO_UNICODE
+# else // _LIBCPP_HAS_UNICODE
__print::__vprint_nonunicode(__stream, __fmt.get(), std::make_format_args(__args...), true);
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
}
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
@@ -372,7 +372,7 @@ _LIBCPP_HIDE_FROM_ABI void println(format_string<_Args...> __fmt, _Args&&... __a
std::println(stdout, __fmt, std::forward<_Args>(__args)...);
}
-# ifndef _LIBCPP_HAS_NO_UNICODE
+# if _LIBCPP_HAS_UNICODE
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
_LIBCPP_HIDE_FROM_ABI inline void vprint_unicode(FILE* __stream, string_view __fmt, format_args __args) {
__print::__vprint_unicode(__stream, __fmt, __args, false);
@@ -383,7 +383,7 @@ _LIBCPP_HIDE_FROM_ABI inline void vprint_unicode(string_view __fmt, format_args
std::vprint_unicode(stdout, __fmt, __args);
}
-# endif // _LIBCPP_HAS_NO_UNICODE
+# endif // _LIBCPP_HAS_UNICODE
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).
_LIBCPP_HIDE_FROM_ABI inline void vprint_nonunicode(FILE* __stream, string_view __fmt, format_args __args) {
diff --git a/libcxx/include/ranges b/libcxx/include/ranges
index fa35874..b17a399 100644
--- a/libcxx/include/ranges
+++ b/libcxx/include/ranges
@@ -415,7 +415,7 @@ namespace std {
# include <__ranges/view_interface.h>
# include <__ranges/views.h>
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
# include <__ranges/istream_view.h>
# endif
#endif
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 074b198..bd75e8d 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -1054,19 +1054,19 @@ private:
template <class _ForwardIterator>
string_type __transform_primary(_ForwardIterator __f, _ForwardIterator __l, char) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _ForwardIterator>
string_type __transform_primary(_ForwardIterator __f, _ForwardIterator __l, wchar_t) const;
#endif
template <class _ForwardIterator>
string_type __lookup_collatename(_ForwardIterator __f, _ForwardIterator __l, char) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _ForwardIterator>
string_type __lookup_collatename(_ForwardIterator __f, _ForwardIterator __l, wchar_t) const;
#endif
template <class _ForwardIterator>
char_class_type __lookup_classname(_ForwardIterator __f, _ForwardIterator __l, bool __icase, char) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _ForwardIterator>
char_class_type __lookup_classname(_ForwardIterator __f, _ForwardIterator __l, bool __icase, wchar_t) const;
#endif
@@ -1075,7 +1075,7 @@ private:
_LIBCPP_HIDE_FROM_ABI int __regex_traits_value(char __ch, int __radix) const {
return __regex_traits_value(static_cast<unsigned char>(__ch), __radix);
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_HIDE_FROM_ABI int __regex_traits_value(wchar_t __ch, int __radix) const;
#endif
};
@@ -1136,7 +1136,7 @@ regex_traits<_CharT>::__transform_primary(_ForwardIterator __f, _ForwardIterator
return __d;
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _CharT>
template <class _ForwardIterator>
typename regex_traits<_CharT>::string_type
@@ -1180,7 +1180,7 @@ regex_traits<_CharT>::__lookup_collatename(_ForwardIterator __f, _ForwardIterato
return __r;
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _CharT>
template <class _ForwardIterator>
typename regex_traits<_CharT>::string_type
@@ -1208,7 +1208,7 @@ regex_traits<_CharT>::__lookup_collatename(_ForwardIterator __f, _ForwardIterato
}
return __r;
}
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
// lookup_classname
@@ -1223,7 +1223,7 @@ regex_traits<_CharT>::__lookup_classname(_ForwardIterator __f, _ForwardIterator
return std::__get_classname(__s.c_str(), __icase);
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _CharT>
template <class _ForwardIterator>
typename regex_traits<_CharT>::char_class_type
@@ -1239,7 +1239,7 @@ regex_traits<_CharT>::__lookup_classname(_ForwardIterator __f, _ForwardIterator
}
return __get_classname(__n.c_str(), __icase);
}
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
template <class _CharT>
bool regex_traits<_CharT>::isctype(char_type __c, char_class_type __m) const {
@@ -1290,7 +1290,7 @@ int regex_traits<_CharT>::__regex_traits_value(unsigned char __ch, int __radix)
return -1;
}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _CharT>
inline int regex_traits<_CharT>::__regex_traits_value(wchar_t __ch, int __radix) const {
return __regex_traits_value(static_cast<unsigned char>(__ct_->narrow(__ch, char_type())), __radix);
@@ -1938,7 +1938,7 @@ public:
template <>
_LIBCPP_EXPORTED_FROM_ABI void __match_any_but_newline<char>::__exec(__state&) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
_LIBCPP_EXPORTED_FROM_ABI void __match_any_but_newline<wchar_t>::__exec(__state&) const;
#endif
@@ -2262,7 +2262,7 @@ template <class _CharT, class _Traits = regex_traits<_CharT> >
class _LIBCPP_TEMPLATE_VIS basic_regex;
typedef basic_regex<char> regex;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
typedef basic_regex<wchar_t> wregex;
#endif
@@ -4181,7 +4181,7 @@ void basic_regex<_CharT, _Traits>::__push_lookahead(const basic_regex& __exp, bo
typedef sub_match<const char*> csub_match;
typedef sub_match<string::const_iterator> ssub_match;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
typedef sub_match<const wchar_t*> wcsub_match;
typedef sub_match<wstring::const_iterator> wssub_match;
#endif
@@ -4526,7 +4526,7 @@ operator<<(basic_ostream<_CharT, _ST>& __os, const sub_match<_BiIter>& __m) {
typedef match_results<const char*> cmatch;
typedef match_results<string::const_iterator> smatch;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
typedef match_results<const wchar_t*> wcmatch;
typedef match_results<wstring::const_iterator> wsmatch;
#endif
@@ -5321,7 +5321,7 @@ class _LIBCPP_TEMPLATE_VIS regex_iterator;
typedef regex_iterator<const char*> cregex_iterator;
typedef regex_iterator<string::const_iterator> sregex_iterator;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
typedef regex_iterator<const wchar_t*> wcregex_iterator;
typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
#endif
@@ -5451,7 +5451,7 @@ class _LIBCPP_TEMPLATE_VIS regex_token_iterator;
typedef regex_token_iterator<const char*> cregex_token_iterator;
typedef regex_token_iterator<string::const_iterator> sregex_token_iterator;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
#endif
@@ -5810,7 +5810,7 @@ using match_results _LIBCPP_AVAILABILITY_PMR =
using cmatch _LIBCPP_AVAILABILITY_PMR = match_results<const char*>;
using smatch _LIBCPP_AVAILABILITY_PMR = match_results<std::pmr::string::const_iterator>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using wcmatch _LIBCPP_AVAILABILITY_PMR = match_results<const wchar_t*>;
using wsmatch _LIBCPP_AVAILABILITY_PMR = match_results<std::pmr::wstring::const_iterator>;
# endif
diff --git a/libcxx/include/semaphore b/libcxx/include/semaphore
index 98122c9..05c85bc8 100644
--- a/libcxx/include/semaphore
+++ b/libcxx/include/semaphore
@@ -47,7 +47,7 @@ using binary_semaphore = counting_semaphore<1>; // since C++20
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
# include <__assert>
# include <__atomic/atomic_base.h>
@@ -177,7 +177,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
diff --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex
index f63bd25..68030e9 100644
--- a/libcxx/include/shared_mutex
+++ b/libcxx/include/shared_mutex
@@ -124,7 +124,7 @@ template <class Mutex>
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
# include <__chrono/duration.h>
# include <__chrono/steady_clock.h>
@@ -455,7 +455,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <system_error>
diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index df03919..4f458c5 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -314,7 +314,7 @@ typedef basic_stringstream<wchar_t> wstringstream;
#include <__config>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
# include <__fwd/sstream.h>
# include <__ostream/basic_ostream.h>
@@ -1283,7 +1283,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCPP_HAS_LOCALIZATION
#if _LIBCPP_STD_VER <= 20 && !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES)
# include <ostream>
diff --git a/libcxx/include/stdatomic.h b/libcxx/include/stdatomic.h
index 2f25b05..f4e9b59 100644
--- a/libcxx/include/stdatomic.h
+++ b/libcxx/include/stdatomic.h
@@ -161,7 +161,7 @@ using std::atomic_char8_t _LIBCPP_USING_IF_EXISTS;
# endif
using std::atomic_char16_t _LIBCPP_USING_IF_EXISTS;
using std::atomic_char32_t _LIBCPP_USING_IF_EXISTS;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using std::atomic_wchar_t _LIBCPP_USING_IF_EXISTS;
# endif
diff --git a/libcxx/include/stop_token b/libcxx/include/stop_token
index cf8d0cf..58e3649 100644
--- a/libcxx/include/stop_token
+++ b/libcxx/include/stop_token
@@ -33,7 +33,7 @@ namespace std {
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
# if _LIBCPP_STD_VER >= 20
# include <__stop_token/stop_callback.h>
@@ -47,7 +47,7 @@ namespace std {
# pragma GCC system_header
# endif
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <cstddef>
diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf
index 906340e..3359c1b 100644
--- a/libcxx/include/streambuf
+++ b/libcxx/include/streambuf
@@ -109,7 +109,7 @@ protected:
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__assert>
# include <__fwd/streambuf.h>
@@ -433,7 +433,7 @@ typename basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Tra
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
# endif
@@ -441,7 +441,7 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <cstdint>
diff --git a/libcxx/include/string b/libcxx/include/string
index e4b2d7a..b1cedbe 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -648,7 +648,7 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len );
#include <string_view>
#include <version>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
# include <cwchar>
#endif
@@ -672,7 +672,7 @@ basic_string<char32_t> operator""s( const char32_t *str, size_t len );
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
# define _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS __attribute__((__no_sanitize__("address")))
// This macro disables AddressSanitizer (ASan) instrumentation for a specific function,
// allowing memory accesses that would normally trigger ASan errors to proceed without crashing.
@@ -785,7 +785,7 @@ public:
//
// This string implementation doesn't contain any references into itself. It only contains a bit that says whether
// it is in small or large string mode, so the entire structure is trivially relocatable if its members are.
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
// When compiling with AddressSanitizer (ASan), basic_string cannot be trivially
// relocatable. Because the object's memory might be poisoned when its content
// is kept inside objects memory (short string optimization), instead of in allocated
@@ -800,7 +800,7 @@ public:
void>;
#endif
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pointer __asan_volatile_wrapper(pointer const& __ptr) const {
if (__libcpp_is_constant_evaluated())
return __ptr;
@@ -2029,7 +2029,7 @@ private:
__annotate_contiguous_container(const void* __old_mid, const void* __new_mid) const {
(void)__old_mid;
(void)__new_mid;
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
# if defined(__APPLE__)
// TODO: remove after addressing issue #96099 (https://github.com/llvm/llvm-project/issues/96099)
if (!__is_long())
@@ -2041,14 +2041,14 @@ private:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_new(size_type __current_size) const _NOEXCEPT {
(void)__current_size;
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
if (!__libcpp_is_constant_evaluated())
__annotate_contiguous_container(data() + capacity() + 1, data() + __current_size + 1);
#endif
}
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_delete() const _NOEXCEPT {
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
if (!__libcpp_is_constant_evaluated())
__annotate_contiguous_container(data() + size() + 1, data() + capacity() + 1);
#endif
@@ -2056,7 +2056,7 @@ private:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_increase(size_type __n) const _NOEXCEPT {
(void)__n;
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
if (!__libcpp_is_constant_evaluated())
__annotate_contiguous_container(data() + size() + 1, data() + size() + 1 + __n);
#endif
@@ -2064,7 +2064,7 @@ private:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_shrink(size_type __old_size) const _NOEXCEPT {
(void)__old_size;
-#if _LIBCPP_HAS_ASAN && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
+#if _LIBCPP_HAS_ASAN && _LIBCPP_INSTRUMENTED_WITH_ASAN
if (!__libcpp_is_constant_evaluated())
__annotate_contiguous_container(data() + __old_size + 1, data() + size() + 1);
#endif
@@ -2276,12 +2276,12 @@ private:
#define _LIBCPP_DECLARE(...) extern template __VA_ARGS__;
#ifdef _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
_LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, char)
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
# endif
#else
_LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, char)
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
# endif
#endif
@@ -4206,7 +4206,7 @@ _LIBCPP_EXPORTED_FROM_ABI string to_string(float __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(double __val);
_LIBCPP_EXPORTED_FROM_ABI string to_string(long double __val);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_EXPORTED_FROM_ABI int stoi(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI long stol(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
_LIBCPP_EXPORTED_FROM_ABI unsigned long stoul(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
@@ -4226,7 +4226,7 @@ _LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(unsigned long long __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(float __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(double __val);
_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(long double __val);
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_TEMPLATE_DATA_VIS const typename basic_string<_CharT, _Traits, _Allocator>::size_type
@@ -4254,7 +4254,7 @@ struct hash<basic_string<char16_t, char_traits<char16_t>, _Allocator> > : __stri
template <class _Allocator>
struct hash<basic_string<char32_t, char_traits<char32_t>, _Allocator> > : __string_hash<char32_t, _Allocator> {};
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <class _Allocator>
struct hash<basic_string<wchar_t, char_traits<wchar_t>, _Allocator> > : __string_hash<wchar_t, _Allocator> {};
#endif
@@ -4310,7 +4310,7 @@ operator""s(const char* __str, size_t __len) {
return basic_string<char>(__str, __len);
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<wchar_t>
operator""s(const wchar_t* __str, size_t __len) {
return basic_string<wchar_t>(__str, __len);
@@ -4338,7 +4338,7 @@ operator""s(const char32_t* __str, size_t __len) {
# if _LIBCPP_STD_VER >= 20
template <>
inline constexpr bool __format::__enable_insertable<std::basic_string<char>> = true;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
inline constexpr bool __format::__enable_insertable<std::basic_string<wchar_t>> = true;
# endif
diff --git a/libcxx/include/string_view b/libcxx/include/string_view
index db1f425..6e05844 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -914,7 +914,7 @@ struct hash<basic_string_view<char16_t, char_traits<char16_t> > > : __string_vie
template <>
struct hash<basic_string_view<char32_t, char_traits<char32_t> > > : __string_view_hash<char32_t> {};
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
struct hash<basic_string_view<wchar_t, char_traits<wchar_t> > > : __string_view_hash<wchar_t> {};
#endif
@@ -926,7 +926,7 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<char> operator""sv(cons
return basic_string_view<char>(__str, __len);
}
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
inline _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<wchar_t>
operator""sv(const wchar_t* __str, size_t __len) noexcept {
return basic_string_view<wchar_t>(__str, __len);
diff --git a/libcxx/include/syncstream b/libcxx/include/syncstream
index 72a5f6c..9707069 100644
--- a/libcxx/include/syncstream
+++ b/libcxx/include/syncstream
@@ -119,7 +119,7 @@ namespace std {
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
# include <__utility/move.h>
# include <ios>
@@ -127,7 +127,7 @@ namespace std {
# include <streambuf>
# include <string>
-# ifndef _LIBCPP_HAS_NO_THREADS
+# if _LIBCPP_HAS_THREADS
# include <map>
# include <mutex>
# include <shared_mutex>
@@ -160,7 +160,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
//
// This helper singleton is used to implement the required
// synchronisation guarantees.
-# ifndef _LIBCPP_HAS_NO_THREADS
+# if _LIBCPP_HAS_THREADS
class __wrapped_streambuf_mutex {
_LIBCPP_HIDE_FROM_ABI __wrapped_streambuf_mutex() = default;
@@ -233,7 +233,7 @@ private:
return __it;
}
};
-# endif // _LIBCPP_HAS_NO_THREADS
+# endif // _LIBCPP_HAS_THREADS
// basic_syncbuf
@@ -373,7 +373,7 @@ private:
if (!__wrapped_)
return false;
-# ifndef _LIBCPP_HAS_NO_THREADS
+# if _LIBCPP_HAS_THREADS
lock_guard<mutex> __lock = __wrapped_streambuf_mutex::__instance().__get_lock(__wrapped_);
# endif
@@ -407,14 +407,14 @@ private:
}
_LIBCPP_HIDE_FROM_ABI void __inc_reference() {
-# ifndef _LIBCPP_HAS_NO_THREADS
+# if _LIBCPP_HAS_THREADS
if (__wrapped_)
__wrapped_streambuf_mutex::__instance().__inc_reference(__wrapped_);
# endif
}
_LIBCPP_HIDE_FROM_ABI void __dec_reference() noexcept {
-# ifndef _LIBCPP_HAS_NO_THREADS
+# if _LIBCPP_HAS_THREADS
if (__wrapped_)
__wrapped_streambuf_mutex::__instance().__dec_reference(__wrapped_);
# endif
@@ -422,7 +422,7 @@ private:
};
using std::syncbuf;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using std::wsyncbuf;
# endif
@@ -505,7 +505,7 @@ private:
};
using std::osyncstream;
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
using std::wosyncstream;
# endif
@@ -515,6 +515,6 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
#endif // _LIBCPP_SYNCSTREAM
diff --git a/libcxx/include/thread b/libcxx/include/thread
index 25cb7ce..bfe7e4a 100644
--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -88,7 +88,7 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <__config>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if _LIBCPP_HAS_THREADS
# include <__thread/formatter.h>
# include <__thread/jthread.h>
@@ -106,7 +106,7 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
# pragma GCC system_header
# endif
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // _LIBCPP_HAS_THREADS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES)
# include <cstddef>
diff --git a/libcxx/include/vector b/libcxx/include/vector
index bd87481..f4fa758 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -356,7 +356,7 @@ template<class T, class charT> requires is-vector-bool-reference<T> // Since C++
# include <cstdint>
# include <cstdlib>
# include <iosfwd>
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
# include <locale>
# endif
# include <string>
diff --git a/libcxx/include/version b/libcxx/include/version
index 571b6e3..fc57aea 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -289,12 +289,12 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_make_reverse_iterator 201402L
# define __cpp_lib_make_unique 201304L
# define __cpp_lib_null_iterators 201304L
-# if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_LOCALIZATION
# define __cpp_lib_quoted_string_io 201304L
# endif
# define __cpp_lib_result_of_sfinae 201210L
# define __cpp_lib_robust_nonmodifying_seq_ops 201304L
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_THREADS
# define __cpp_lib_shared_timed_mutex 201402L
# endif
# define __cpp_lib_string_udls 201304L
@@ -319,7 +319,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_clamp 201603L
# define __cpp_lib_enable_shared_from_this 201603L
// # define __cpp_lib_execution 201603L
-# if !defined(_LIBCPP_HAS_NO_FILESYSTEM) && _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY
+# if _LIBCPP_HAS_FILESYSTEM && _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY
# define __cpp_lib_filesystem 201703L
# endif
# define __cpp_lib_gcd_lcm 201606L
@@ -348,10 +348,10 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_parallel_algorithm 201603L
# define __cpp_lib_raw_memory_algorithms 201606L
# define __cpp_lib_sample 201603L
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_THREADS
# define __cpp_lib_scoped_lock 201703L
# endif
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if _LIBCPP_HAS_THREADS
# define __cpp_lib_shared_mutex 201505L
# endif
# define __cpp_lib_shared_ptr_arrays 201611L
@@ -380,7 +380,7 @@ __cpp_lib_void_t 201411L <type_traits>
# if _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_atomic_wait 201907L
# endif
-# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
+# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_barrier 201907L
# endif
# define __cpp_lib_bind_front 201907L
@@ -421,10 +421,10 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_is_layout_compatible 201907L
# define __cpp_lib_is_nothrow_convertible 201806L
// # define __cpp_lib_is_pointer_interconvertible 201907L
-# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
+# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_jthread 201911L
# endif
-# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
+# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_latch 201907L
# endif
# define __cpp_lib_list_remove_return_type 201806L
@@ -437,7 +437,7 @@ __cpp_lib_void_t 201411L <type_traits>
# endif
# define __cpp_lib_ranges 202110L
# define __cpp_lib_remove_cvref 201711L
-# if !defined(_LIBCPP_HAS_NO_THREADS) && _LIBCPP_AVAILABILITY_HAS_SYNC
+# if _LIBCPP_HAS_THREADS && _LIBCPP_AVAILABILITY_HAS_SYNC
# define __cpp_lib_semaphore 201907L
# endif
# undef __cpp_lib_shared_ptr_arrays
@@ -540,7 +540,7 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_freestanding_optional 202311L
// # define __cpp_lib_freestanding_string_view 202311L
// # define __cpp_lib_freestanding_variant 202311L
-# if !defined(_LIBCPP_HAS_NO_FILESYSTEM) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+# if _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
# define __cpp_lib_fstream_native_handle 202306L
# endif
// # define __cpp_lib_function_ref 202306L
diff --git a/libcxx/include/wchar.h b/libcxx/include/wchar.h
index c965b28..b7cd5d7 100644
--- a/libcxx/include/wchar.h
+++ b/libcxx/include/wchar.h
@@ -137,7 +137,7 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
# endif
# endif
-# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+# if _LIBCPP_HAS_WIDE_CHARACTERS
# if defined(__cplusplus) && !defined(_LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
extern "C++" {
inline _LIBCPP_HIDE_FROM_ABI wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {
@@ -203,6 +203,6 @@ size_t wcsnrtombs(
char* __restrict __dst, const wchar_t** __restrict __src, size_t __nwc, size_t __len, mbstate_t* __restrict __ps);
} // extern "C"
# endif // __cplusplus && (_LIBCPP_MSVCRT || __MVS__)
-# endif // !_LIBCPP_HAS_NO_WIDE_CHARACTERS
+# endif // _LIBCPP_HAS_WIDE_CHARACTERS
#endif // _LIBCPP_WCHAR_H