Skip to content

Commit 4d4b5ad

Browse files
Add meta predicates for reference binding (#175)
Add semantic meta operators for type-testing of temporary binding and temporary conversion to references, respectively for `std::reference_constructs_from_temporary` and `std::reference_converts_from_temporary`.
1 parent 7bf24f8 commit 4d4b5ad

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

ltx/exprs.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,6 +2272,8 @@ \subsection{Dyadic operators}
22722272
\enumerator{ClearStorage}
22732273
\enumerator{Select}
22742274
\enumerator{Address}
2275+
\enumerator{BindTemporaryToReference}
2276+
\enumerator{ConvertTemporaryToReference}
22752277

22762278
\setcounter{enumi}{1023}
22772279
\enumerator{Msvc}
@@ -2564,6 +2566,15 @@ \subsection{Dyadic operators}
25642566
a \sortref{Select}{DyadicOperator} syntactic tree (especially in template code), this specific operator is used only
25652567
when the scope is known to be a class-type and the member is known to be a non-static data member or a non-static member function.}
25662568

2569+
\ifcSortSection{BindTemporaryToReference}{DyadicOperator}
2570+
A meta-operator the operands of which are type expressions. Let's $U$ and $V$ be the types designated by the first and second operands, respectively.
2571+
The value of this predicate on $U$ and $V$ is the same as that of \code{std::reference_constructs_from_temporary_v<}$U$\code{, }$V$\code{>}.
2572+
2573+
\ifcSortSection{ConvertTemporaryToReference}{DyadicOperator}
2574+
A meta-operator the operands of which are type expressions. Let's $U$ and $V$ be the types designated by the first and second operands, respectively.
2575+
The value of this predicate on $U$ and $V$ is the same as that of \code{std::reference_convert_from_temporary_v<}$U$\code{, }$V$\code{>}.
2576+
2577+
25672578
\ifcSortSection{Msvc}{DyadicOperator}
25682579
This is a marker, not an actual operator. Dyadic operators with
25692580
value greater that this are MSVC extensions.

ltx/words.tex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,8 @@ \subsubsection{\valueTag{WordSort::Keyword}}
687687
\enumerator{Volatile}
688688
\enumerator{WcharT}
689689
\enumerator{While}
690+
\enumerator{BindTemporaryToReference}
691+
\enumerator{ConvertTemporaryToReference}
690692
\end{Enumeration}
691693
and those with values greater than $0x1FFF$
692694
\begin{Enumeration}{SourceKeyword}\setcounter{enumi}{8190}
@@ -890,6 +892,8 @@ \subsubsection{\valueTag{WordSort::Keyword}}
890892
\ifcdoc{Volatile}{SourceKeyword} A reserved word for ``\code{volatile}''.
891893
\ifcdoc{WcharT}{SourceKeyword} A reserved word for ``\code{wchar_t}''.
892894
\ifcdoc{While}{SourceKeyword} A reserved word for ``\code{while}''.
895+
\ifdoc{BindTemporaryToReference} A reserved word for ``\code{__reference_constructs_from_temporary}''.
896+
\ifcdoc{ConvertTemporaryToReference} A reserved word for ``\code{__reference_converts_from_temporary}''.
893897

894898

895899
\ifcdoc{Msvc}{SourceKeyword} No reserved word of this value shall be produced. All MSVC-specific

0 commit comments

Comments
 (0)