Skip to content

[cmp.categories] Exposition-only formatting for value and is-ordered #6426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4882,14 +4882,14 @@
\begin{codeblock}
namespace std {
class partial_ordering {
int value; // \expos
bool is_ordered; // \expos
int @\exposid{value}@; // \expos
bool @\exposid{is-ordered}@; // \expos

// exposition-only constructors
constexpr explicit
partial_ordering(@\placeholder{ord}@ v) noexcept : value(int(v)), is_ordered(true) {} // \expos
partial_ordering(@\placeholder{ord}@ v) noexcept : @\exposid{value}@(int(v)), @\exposid{is-ordered}@(true) {} // \expos
constexpr explicit
partial_ordering(@\placeholder{ncmp}@ v) noexcept : value(int(v)), is_ordered(false) {} // \expos
partial_ordering(@\placeholder{ncmp}@ v) noexcept : @\exposid{value}@(int(v)), @\exposid{is-ordered}@(false) {} // \expos

public:
// valid values
Expand Down Expand Up @@ -4937,7 +4937,7 @@
\begin{itemdescr}
\pnum
\returns
For \tcode{operator@}, \tcode{v.is_ordered \&\& v.value @ 0}.
For \tcode{operator@}, \tcode{v.\exposid{is-ordered} \&\& v.\exposid{value} @ 0}.
\end{itemdescr}

\indexlibrarymember{operator<}{partial_ordering}%
Expand All @@ -4954,7 +4954,7 @@
\begin{itemdescr}
\pnum
\returns
For \tcode{operator@}, \tcode{v.is_ordered \&\& 0 @ v.value}.
For \tcode{operator@}, \tcode{v.\exposid{is-ordered} \&\& 0 @ v.\exposid{value}}.
\end{itemdescr}

\indexlibrarymember{operator<=>}{partial_ordering}%
Expand Down Expand Up @@ -4995,10 +4995,10 @@
\begin{codeblock}
namespace std {
class weak_ordering {
int value; // \expos
int @\exposid{value}@; // \expos

// exposition-only constructors
constexpr explicit weak_ordering(@\placeholder{ord}@ v) noexcept : value(int(v)) {} // \expos
constexpr explicit weak_ordering(@\placeholder{ord}@ v) noexcept : @\exposid{value}@(int(v)) {} // \expos

public:
// valid values
Expand Down Expand Up @@ -5040,8 +5040,8 @@
\pnum
\returns
\begin{codeblock}
value == 0 ? partial_ordering::equivalent :
value < 0 ? partial_ordering::less :
@\exposid{value}@ == 0 ? partial_ordering::equivalent :
@\exposid{value}@ < 0 ? partial_ordering::less :
partial_ordering::greater
\end{codeblock}
\end{itemdescr}
Expand All @@ -5062,7 +5062,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{v.value @ 0} for \tcode{operator@}.
\tcode{v.\exposid{value} @ 0} for \tcode{operator@}.
\end{itemdescr}

\indexlibrarymember{operator<}{weak_ordering}%
Expand All @@ -5079,7 +5079,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{0 @ v.value} for \tcode{operator@}.
\tcode{0 @ v.\exposid{value}} for \tcode{operator@}.
\end{itemdescr}

\indexlibrarymember{operator<=>}{weak_ordering}%
Expand Down Expand Up @@ -5121,10 +5121,10 @@
\begin{codeblock}
namespace std {
class strong_ordering {
int value; // \expos
int @\exposid{value}@; // \expos

// exposition-only constructors
constexpr explicit strong_ordering(@\placeholder{ord}@ v) noexcept : value(int(v)) {} // \expos
constexpr explicit strong_ordering(@\placeholder{ord}@ v) noexcept : @\exposid{value}@(int(v)) {} // \expos

public:
// valid values
Expand Down Expand Up @@ -5169,8 +5169,8 @@
\pnum
\returns
\begin{codeblock}
value == 0 ? partial_ordering::equivalent :
value < 0 ? partial_ordering::less :
@\exposid{value}@ == 0 ? partial_ordering::equivalent :
@\exposid{value}@ < 0 ? partial_ordering::less :
partial_ordering::greater
\end{codeblock}
\end{itemdescr}
Expand All @@ -5184,8 +5184,8 @@
\pnum
\returns
\begin{codeblock}
value == 0 ? weak_ordering::equivalent :
value < 0 ? weak_ordering::less :
@\exposid{value}@ == 0 ? weak_ordering::equivalent :
@\exposid{value}@ < 0 ? weak_ordering::less :
weak_ordering::greater
\end{codeblock}
\end{itemdescr}
Expand All @@ -5206,7 +5206,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{v.value @ 0} for \tcode{operator@}.
\tcode{v.\exposid{value} @ 0} for \tcode{operator@}.
\end{itemdescr}

\indexlibrarymember{operator<}{strong_ordering}%
Expand All @@ -5223,7 +5223,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{0 @ v.value} for \tcode{operator@}.
\tcode{0 @ v.\exposid{value}} for \tcode{operator@}.
\end{itemdescr}

\indexlibrarymember{operator<=>}{strong_ordering}%
Expand Down