Skip to content

Commit

Permalink
P2835R7 Expose std::atomic_ref 's object address
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer committed Nov 28, 2024
1 parent d017ce4 commit aeebbbb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@
#define @\defnlibxname{cpp_lib_atomic_is_always_lock_free}@ 201603L // freestanding, also in \libheader{atomic}
#define @\defnlibxname{cpp_lib_atomic_lock_free_type_aliases}@ 201907L // also in \libheader{atomic}
#define @\defnlibxname{cpp_lib_atomic_min_max}@ 202403L // freestanding, also in \libheader{atomic}
#define @\defnlibxname{cpp_lib_atomic_ref}@ 201806L // freestanding, also in \libheader{atomic}
#define @\defnlibxname{cpp_lib_atomic_ref}@ 202411L // freestanding, also in \libheader{atomic}
#define @\defnlibxname{cpp_lib_atomic_shared_ptr}@ 201711L // also in \libheader{memory}
#define @\defnlibxname{cpp_lib_atomic_value_initialization}@ 201911L // freestanding, also in \libheader{atomic}, \libheader{memory}
#define @\defnlibxname{cpp_lib_atomic_wait}@ 201907L // freestanding, also in \libheader{atomic}
Expand Down
15 changes: 15 additions & 0 deletions source/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3154,6 +3154,7 @@
void wait(T, memory_order = memory_order::seq_cst) const noexcept;
void notify_one() const noexcept;
void notify_all() const noexcept;
constexpr T* address() const noexcept;
};
}
\end{codeblock}
Expand Down Expand Up @@ -3539,6 +3540,17 @@
on atomic object \tcode{*ptr}.
\end{itemdescr}

\indexlibrarymember{address}{atomic_ref<T>}%
\begin{itemdecl}
constexpr T* address() const noexcept;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
\tcode{ptr}.
\end{itemdescr}

\rSec3[atomics.ref.int]{Specializations for integral types}

\pnum
Expand Down Expand Up @@ -3631,6 +3643,7 @@
void wait(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) const noexcept;
void notify_one() const noexcept;
void notify_all() const noexcept;
constexpr @\placeholder{integral-type}@* address() const noexcept;
};
}
\end{codeblock}
Expand Down Expand Up @@ -3760,6 +3773,7 @@
void wait(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const noexcept;
void notify_one() const noexcept;
void notify_all() const noexcept;
constexpr @\placeholder{floating-point-type}@* address() const noexcept;
};
}
\end{codeblock}
Expand Down Expand Up @@ -3871,6 +3885,7 @@
void wait(T*, memory_order = memory_order::seq_cst) const noexcept;
void notify_one() const noexcept;
void notify_all() const noexcept;
constexpr @\placeholder{pointer-type}* address() const noexcept;
};
}
\end{codeblock}
Expand Down

0 comments on commit aeebbbb

Please sign in to comment.