@@ -586,8 +586,7 @@ struct _Atomic_storage {
586
586
587
587
_Atomic_storage() = default;
588
588
589
- /* implicit */ constexpr _Atomic_storage(conditional_t<is_reference_v<_Ty>, _Ty, const _TVal> _Value) noexcept
590
- : _Storage(_Value) {
589
+ /* implicit */ constexpr _Atomic_storage(const _Ty& _Value) noexcept : _Storage(_Value) {
591
590
// non-atomically initialize this atomic
592
591
}
593
592
@@ -714,13 +713,11 @@ public:
714
713
715
714
template <class _Ty>
716
715
struct _Atomic_storage<_Ty, 1> { // lock-free using 1-byte intrinsics
717
-
718
716
using _TVal = remove_reference_t<_Ty>;
719
717
720
718
_Atomic_storage() = default;
721
719
722
- /* implicit */ constexpr _Atomic_storage(conditional_t<is_reference_v<_Ty>, _Ty, const _TVal> _Value) noexcept
723
- : _Storage{_Value} {
720
+ /* implicit */ constexpr _Atomic_storage(const _Ty& _Value) noexcept : _Storage{_Value} {
724
721
// non-atomically initialize this atomic
725
722
}
726
723
@@ -817,13 +814,11 @@ struct _Atomic_storage<_Ty, 1> { // lock-free using 1-byte intrinsics
817
814
818
815
template <class _Ty>
819
816
struct _Atomic_storage<_Ty, 2> { // lock-free using 2-byte intrinsics
820
-
821
817
using _TVal = remove_reference_t<_Ty>;
822
818
823
819
_Atomic_storage() = default;
824
820
825
- /* implicit */ constexpr _Atomic_storage(conditional_t<is_reference_v<_Ty>, _Ty, const _TVal> _Value) noexcept
826
- : _Storage{_Value} {
821
+ /* implicit */ constexpr _Atomic_storage(const _Ty& _Value) noexcept : _Storage{_Value} {
827
822
// non-atomically initialize this atomic
828
823
}
829
824
@@ -919,13 +914,11 @@ struct _Atomic_storage<_Ty, 2> { // lock-free using 2-byte intrinsics
919
914
920
915
template <class _Ty>
921
916
struct _Atomic_storage<_Ty, 4> { // lock-free using 4-byte intrinsics
922
-
923
917
using _TVal = remove_reference_t<_Ty>;
924
918
925
919
_Atomic_storage() = default;
926
920
927
- /* implicit */ constexpr _Atomic_storage(conditional_t<is_reference_v<_Ty>, _Ty, const _TVal> _Value) noexcept
928
- : _Storage{_Value} {
921
+ /* implicit */ constexpr _Atomic_storage(const _Ty& _Value) noexcept : _Storage{_Value} {
929
922
// non-atomically initialize this atomic
930
923
}
931
924
@@ -1021,13 +1014,11 @@ struct _Atomic_storage<_Ty, 4> { // lock-free using 4-byte intrinsics
1021
1014
1022
1015
template <class _Ty>
1023
1016
struct _Atomic_storage<_Ty, 8> { // lock-free using 8-byte intrinsics
1024
-
1025
1017
using _TVal = remove_reference_t<_Ty>;
1026
1018
1027
1019
_Atomic_storage() = default;
1028
1020
1029
- /* implicit */ constexpr _Atomic_storage(conditional_t<is_reference_v<_Ty>, _Ty, const _TVal> _Value) noexcept
1030
- : _Storage{_Value} {
1021
+ /* implicit */ constexpr _Atomic_storage(const _Ty& _Value) noexcept : _Storage{_Value} {
1031
1022
// non-atomically initialize this atomic
1032
1023
}
1033
1024
@@ -1148,7 +1139,8 @@ struct _Atomic_storage<_Ty&, 16> { // lock-free using 16-byte intrinsics
1148
1139
1149
1140
_Atomic_storage() = default;
1150
1141
1151
- /* implicit */ constexpr _Atomic_storage(conditional_t<is_reference_v<_Ty&>, _Ty&, const _TVal> _Value) noexcept
1142
+ // TRANSITION, ABI: replace _this_ occurrence of '_Ty&' with 'const _Ty&'
1143
+ /* implicit */ constexpr _Atomic_storage(_Ty& _Value) noexcept
1152
1144
: _Storage{_Value} {} // non-atomically initialize this atomic
1153
1145
1154
1146
void store(const _TVal _Value) noexcept { // store with sequential consistency
@@ -2121,10 +2113,11 @@ public:
2121
2113
2122
2114
using value_type = _Ty;
2123
2115
2124
- using _Base::_Base;
2125
-
2116
+ template <class _Uty = _Ty, enable_if_t<is_default_constructible_v<_Uty>, int> = 0>
2126
2117
constexpr atomic() noexcept(is_nothrow_default_constructible_v<_Ty>) : _Base() {}
2127
2118
2119
+ /* implicit */ constexpr atomic(const _Ty _Value) noexcept : _Base(_Value) {}
2120
+
2128
2121
atomic(const atomic&) = delete;
2129
2122
atomic& operator=(const atomic&) = delete;
2130
2123
atomic& operator=(const atomic&) volatile = delete;
0 commit comments