aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include
diff options
context:
space:
mode:
authorNoah Goldstein <goldstein.w.n@gmail.com>2024-03-13 13:13:52 -0700
committerFangrui Song <i@maskray.me>2024-03-13 13:13:52 -0700
commit9ce8691dea8dadc1302abacf4302f3b805e1448d (patch)
treefdc2da3081156b4c9b80b0d417f090efadac946c /libcxx/include
parent795e3c3d94da0a664642d4580d87c82c02d5eca4 (diff)
parent744a23f24b08e8b988b176173c433d64761e66b3 (diff)
downloadllvm-users/MaskRay/spr/main.llvm-objcopy-add-compress-sections.zip
llvm-users/MaskRay/spr/main.llvm-objcopy-add-compress-sections.tar.gz
llvm-users/MaskRay/spr/main.llvm-objcopy-add-compress-sections.tar.bz2
[𝘀𝗽𝗿] changes introduced through rebaseusers/MaskRay/spr/main.llvm-objcopy-add-compress-sections
Created using spr 1.3.5-bogner [skip ci]
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/variant32
1 files changed, 5 insertions, 27 deletions
diff --git a/libcxx/include/variant b/libcxx/include/variant
index d1eea52f..59d7f9b 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -347,13 +347,13 @@ inline constexpr size_t variant_npos = static_cast<size_t>(-1);
template <size_t _NumAlternatives>
_LIBCPP_HIDE_FROM_ABI constexpr auto __choose_index_type() {
-#ifdef _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
+# ifdef _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
if constexpr (_NumAlternatives < numeric_limits<unsigned char>::max())
return static_cast<unsigned char>(0);
else if constexpr (_NumAlternatives < numeric_limits<unsigned short>::max())
return static_cast<unsigned short>(0);
else
-#endif // _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
+# endif // _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
return static_cast<unsigned int>(0);
}
@@ -1085,13 +1085,9 @@ struct __narrowing_check {
};
template <class _Dest, class _Source>
-using __check_for_narrowing _LIBCPP_NODEBUG = typename _If<
-# ifdef _LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT
- false &&
-# endif
- is_arithmetic<_Dest>::value,
- __narrowing_check,
- __no_narrowing_check >::template _Apply<_Dest, _Source>;
+using __check_for_narrowing _LIBCPP_NODEBUG =
+ typename _If< is_arithmetic<_Dest>::value, __narrowing_check, __no_narrowing_check >::template _Apply<_Dest,
+ _Source>;
template <class _Tp, size_t _Idx>
struct __overload {
@@ -1099,24 +1095,6 @@ struct __overload {
auto operator()(_Tp, _Up&&) const -> __check_for_narrowing<_Tp, _Up>;
};
-// TODO(LLVM-19): Remove all occurrences of this macro.
-# ifdef _LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT
-template <class _Tp, size_t>
-struct __overload_bool {
- template <class _Up, class _Ap = __remove_cvref_t<_Up>>
- auto operator()(bool, _Up&&) const -> enable_if_t<is_same_v<_Ap, bool>, __type_identity<_Tp>>;
-};
-
-template <size_t _Idx>
-struct __overload<bool, _Idx> : __overload_bool<bool, _Idx> {};
-template <size_t _Idx>
-struct __overload<bool const, _Idx> : __overload_bool<bool const, _Idx> {};
-template <size_t _Idx>
-struct __overload<bool volatile, _Idx> : __overload_bool<bool volatile, _Idx> {};
-template <size_t _Idx>
-struct __overload<bool const volatile, _Idx> : __overload_bool<bool const volatile, _Idx> {};
-# endif
-
template <class... _Bases>
struct __all_overloads : _Bases... {
void operator()() const;