Skip to content

Commit a758920

Browse files
authored
Merge 2024-11 LWG Motion 12
P2835R7 Expose std::atomic_ref 's object address
2 parents 6e099a5 + 2691a9d commit a758920

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

source/support.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@
577577
#define @\defnlibxname{cpp_lib_atomic_is_always_lock_free}@ 201603L // freestanding, also in \libheader{atomic}
578578
#define @\defnlibxname{cpp_lib_atomic_lock_free_type_aliases}@ 201907L // also in \libheader{atomic}
579579
#define @\defnlibxname{cpp_lib_atomic_min_max}@ 202403L // freestanding, also in \libheader{atomic}
580-
#define @\defnlibxname{cpp_lib_atomic_ref}@ 201806L // freestanding, also in \libheader{atomic}
580+
#define @\defnlibxname{cpp_lib_atomic_ref}@ 202411L // freestanding, also in \libheader{atomic}
581581
#define @\defnlibxname{cpp_lib_atomic_shared_ptr}@ 201711L // also in \libheader{memory}
582582
#define @\defnlibxname{cpp_lib_atomic_value_initialization}@ 201911L // freestanding, also in \libheader{atomic}, \libheader{memory}
583583
#define @\defnlibxname{cpp_lib_atomic_wait}@ 201907L // freestanding, also in \libheader{atomic}

source/threads.tex

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3154,6 +3154,7 @@
31543154
void wait(T, memory_order = memory_order::seq_cst) const noexcept;
31553155
void notify_one() const noexcept;
31563156
void notify_all() const noexcept;
3157+
constexpr T* address() const noexcept;
31573158
};
31583159
}
31593160
\end{codeblock}
@@ -3539,6 +3540,17 @@
35393540
on atomic object \tcode{*ptr}.
35403541
\end{itemdescr}
35413542

3543+
\indexlibrarymember{address}{atomic_ref<T>}%
3544+
\begin{itemdecl}
3545+
constexpr T* address() const noexcept;
3546+
\end{itemdecl}
3547+
3548+
\begin{itemdescr}
3549+
\pnum
3550+
\returns
3551+
\tcode{ptr}.
3552+
\end{itemdescr}
3553+
35423554
\rSec3[atomics.ref.int]{Specializations for integral types}
35433555

35443556
\pnum
@@ -3631,6 +3643,7 @@
36313643
void wait(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) const noexcept;
36323644
void notify_one() const noexcept;
36333645
void notify_all() const noexcept;
3646+
constexpr @\placeholder{integral-type}@* address() const noexcept;
36343647
};
36353648
}
36363649
\end{codeblock}
@@ -3760,6 +3773,7 @@
37603773
void wait(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const noexcept;
37613774
void notify_one() const noexcept;
37623775
void notify_all() const noexcept;
3776+
constexpr @\placeholder{floating-point-type}@* address() const noexcept;
37633777
};
37643778
}
37653779
\end{codeblock}
@@ -3871,6 +3885,7 @@
38713885
void wait(T*, memory_order = memory_order::seq_cst) const noexcept;
38723886
void notify_one() const noexcept;
38733887
void notify_all() const noexcept;
3888+
constexpr @\placeholder{pointer-type}@* address() const noexcept;
38743889
};
38753890
}
38763891
\end{codeblock}

0 commit comments

Comments
 (0)