diff --git a/atomic.md b/atomic.md index ab4df7e..7a7399d 100644 --- a/atomic.md +++ b/atomic.md @@ -14,6 +14,10 @@ toc: true # Revision History ## R1 - Added `noexcept` specifier. +- Changed constraints wording to say "`T` and `U` are similar types" per LWG feedback +- Added converting constructor to specializations for integral types +- Added converting constructor to specializations for floating-point types +- Added converting constructor to specializations for pointer types ## R0 - Initial revision @@ -49,7 +53,7 @@ constexpr atomic_ref(const atomic_ref& ref) noexcept; [9]{.pnum} *Contraints*: -- [9.1]{.pnum} `is_same_v, remove_cv_t>` is `true`, and +- [9.1]{.pnum} `T` and `U` are similar types ([conv.qual]), and - [9.2]{.pnum} `is_convertible_v` is `true` @@ -57,6 +61,33 @@ constexpr atomic_ref(const atomic_ref& ref) noexcept; ::: +Change [atomics.ref.int]{.sref} as follows: + +```cpp + constexpr explicit atomic_ref(integral-type&); + constexpr atomic_ref(const atomic_ref&) noexcept; + @[`template `]{.add}@ + @[`constexpr atomic_ref(const atomic_ref&) noexcept;`]{.add}@ +``` + +Change [atomics.ref.float]{.sref} as follows: + +```cpp + constexpr explicit atomic_ref(floating-point-type&); + constexpr atomic_ref(const atomic_ref&) noexcept; + @[`template `]{.add}@ + @[`constexpr atomic_ref(const atomic_ref&) noexcept;`]{.add}@ +``` + +Change [atomics.ref.pointer]{.sref} as follows: + +```cpp + constexpr explicit atomic_ref(pointer-type&); + constexpr atomic_ref(const atomic_ref&) noexcept; + @[`template `]{.add}@ + @[`constexpr atomic_ref(const atomic_ref&) noexcept;`]{.add}@ +``` + # Implementation Experience [@P3323R1] is currently being implemented in libc++ and adding the proposed constructor is under way.