|
3319 | 3319 |
|
3320 | 3320 | \rSec3[optional.ctor]{Constructors}
|
3321 | 3321 |
|
| 3322 | +\pnum |
| 3323 | +The exposition-only variable template \exposid{converts-from-any-cvref} |
| 3324 | +is used by some constructors for \tcode{optional}. |
| 3325 | +\begin{codeblock} |
| 3326 | +template<class T, class W> |
| 3327 | +constexpr bool @\exposid{converts-from-any-cvref}@ = // \expos |
| 3328 | + disjunction_v<is_constructible<T, W&>, is_convertible<W&, T>, |
| 3329 | + is_constructible<T, W>, is_convertible<W, T>, |
| 3330 | + is_constructible<T, const W&>, is_convertible<const W&, T>, |
| 3331 | + is_constructible<T, const W>, is_convertible<const W, T>>; |
| 3332 | +\end{codeblock} |
| 3333 | + |
3322 | 3334 | \indexlibraryctor{optional}%
|
3323 | 3335 | \begin{itemdecl}
|
3324 | 3336 | constexpr optional() noexcept;
|
|
3493 | 3505 | \pnum
|
3494 | 3506 | \constraints
|
3495 | 3507 | \begin{itemize}
|
3496 |
| -\item \tcode{is_constructible_v<T, const U\&>} is \tcode{true}, |
3497 |
| -\item \tcode{is_constructible_v<T, optional<U>\&>} is \tcode{false}, |
3498 |
| -\item \tcode{is_constructible_v<T, optional<U>\&\&>} is \tcode{false}, |
3499 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&>} is \tcode{false}, |
3500 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&\&>} is \tcode{false}, |
3501 |
| -\item \tcode{is_convertible_v<optional<U>\&, T>} is \tcode{false}, |
3502 |
| -\item \tcode{is_convertible_v<optional<U>\&\&, T>} is \tcode{false}, |
3503 |
| -\item \tcode{is_convertible_v<const optional<U>\&, T>} is \tcode{false}, and |
3504 |
| -\item \tcode{is_convertible_v<const optional<U>\&\&, T>} is \tcode{false}. |
| 3508 | +\item \tcode{is_constructible_v<T, const U\&>} is \tcode{true}, and |
| 3509 | +\item \tcode{\exposid{converts-from-any-cvref}<T, optional<U>>} is \tcode{false}. |
3505 | 3510 | \end{itemize}
|
3506 | 3511 |
|
3507 | 3512 | \pnum
|
|
3534 | 3539 | \pnum
|
3535 | 3540 | \constraints
|
3536 | 3541 | \begin{itemize}
|
3537 |
| -\item \tcode{is_constructible_v<T, U>} is \tcode{true}, |
3538 |
| -\item \tcode{is_constructible_v<T, optional<U>\&>} is \tcode{false}, |
3539 |
| -\item \tcode{is_constructible_v<T, optional<U>\&\&>} is \tcode{false}, |
3540 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&>} is \tcode{false}, |
3541 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&\&>} is \tcode{false}, |
3542 |
| -\item \tcode{is_convertible_v<optional<U>\&, T>} is \tcode{false}, |
3543 |
| -\item \tcode{is_convertible_v<optional<U>\&\&, T>} is \tcode{false}, |
3544 |
| -\item \tcode{is_convertible_v<const optional<U>\&, T>} is \tcode{false}, and |
3545 |
| -\item \tcode{is_convertible_v<const optional<U>\&\&, T>} is \tcode{false}. |
| 3542 | +\item \tcode{is_constructible_v<T, U>} is \tcode{true}, and |
| 3543 | +\item \tcode{\exposid{converts-from-any-cvref}<T, optional<U>>} is \tcode{false}. |
3546 | 3544 | \end{itemize}
|
3547 | 3545 |
|
3548 | 3546 | \pnum
|
|
3751 | 3749 | \begin{itemize}
|
3752 | 3750 | \item \tcode{is_constructible_v<T, const U\&>} is \tcode{true},
|
3753 | 3751 | \item \tcode{is_assignable_v<T\&, const U\&>} is \tcode{true},
|
3754 |
| -\item \tcode{is_constructible_v<T, optional<U>\&>} is \tcode{false}, |
3755 |
| -\item \tcode{is_constructible_v<T, optional<U>\&\&>} is \tcode{false}, |
3756 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&>} is \tcode{false}, |
3757 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&\&>} is \tcode{false}, |
3758 |
| -\item \tcode{is_convertible_v<optional<U>\&, T>} is \tcode{false}, |
3759 |
| -\item \tcode{is_convertible_v<optional<U>\&\&, T>} is \tcode{false}, |
3760 |
| -\item \tcode{is_convertible_v<const optional<U>\&, T>} is \tcode{false}, |
3761 |
| -\item \tcode{is_convertible_v<const optional<U>\&\&, T>} is \tcode{false}, |
| 3752 | +\item \tcode{\exposid{converts-from-any-cvref}<T, optional<U>>} is \tcode{false}, |
3762 | 3753 | \item \tcode{is_assignable_v<T\&, optional<U>\&>} is \tcode{false},
|
3763 | 3754 | \item \tcode{is_assignable_v<T\&, optional<U>\&\&>} is \tcode{false},
|
3764 | 3755 | \item \tcode{is_assignable_v<T\&, const optional<U>\&>} is \tcode{false}, and
|
|
3813 | 3804 | \begin{itemize}
|
3814 | 3805 | \item \tcode{is_constructible_v<T, U>} is \tcode{true},
|
3815 | 3806 | \item \tcode{is_assignable_v<T\&, U>} is \tcode{true},
|
3816 |
| -\item \tcode{is_constructible_v<T, optional<U>\&>} is \tcode{false}, |
3817 |
| -\item \tcode{is_constructible_v<T, optional<U>\&\&>} is \tcode{false}, |
3818 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&>} is \tcode{false}, |
3819 |
| -\item \tcode{is_constructible_v<T, const optional<U>\&\&>} is \tcode{false}, |
3820 |
| -\item \tcode{is_convertible_v<optional<U>\&, T>} is \tcode{false}, |
3821 |
| -\item \tcode{is_convertible_v<optional<U>\&\&, T>} is \tcode{false}, |
3822 |
| -\item \tcode{is_convertible_v<const optional<U>\&, T>} is \tcode{false}, |
3823 |
| -\item \tcode{is_convertible_v<const optional<U>\&\&, T>} is \tcode{false}, |
| 3807 | +\item \tcode{\exposid{converts-from-any-cvref}<T, optional<U>>} is \tcode{false}, |
3824 | 3808 | \item \tcode{is_assignable_v<T\&, optional<U>\&>} is \tcode{false},
|
3825 | 3809 | \item \tcode{is_assignable_v<T\&, optional<U>\&\&>} is \tcode{false},
|
3826 | 3810 | \item \tcode{is_assignable_v<T\&, const optional<U>\&>} is \tcode{false}, and
|
|
7377 | 7361 |
|
7378 | 7362 | \rSec3[expected.object.cons]{Constructors}
|
7379 | 7363 |
|
| 7364 | +\pnum |
| 7365 | +The exposition-only variable template \exposid{converts-from-any-cvref} |
| 7366 | +defined in \ref{optional.ctor} |
| 7367 | +is used by some constructors for \tcode{expected}. |
| 7368 | + |
7380 | 7369 | \indexlibraryctor{expected}%
|
7381 | 7370 | \begin{itemdecl}
|
7382 | 7371 | constexpr expected();
|
|
7515 | 7504 | \item
|
7516 | 7505 | \tcode{is_constructible_v<E, GF>} is \tcode{true}; and
|
7517 | 7506 | \item
|
7518 |
| -\tcode{is_constructible_v<T, expected<U, G>\&>} is \tcode{false}; and |
7519 |
| -\item |
7520 |
| -\tcode{is_constructible_v<T, expected<U, G>>} is \tcode{false}; and |
7521 |
| -\item |
7522 |
| -\tcode{is_constructible_v<T, const expected<U, G>\&>} is \tcode{false}; and |
7523 |
| -\item |
7524 |
| -\tcode{is_constructible_v<T, const expected<U, G>>} is \tcode{false}; and |
7525 |
| -\item |
7526 |
| -\tcode{is_convertible_v<expected<U, G>\&, T>} is \tcode{false}; and |
7527 |
| -\item |
7528 |
| -\tcode{is_convertible_v<expected<U, G>\&\&, T>} is \tcode{false}; and |
7529 |
| -\item |
7530 |
| -\tcode{is_convertible_v<const expected<U, G>\&, T>} is \tcode{false}; and |
7531 |
| -\item |
7532 |
| -\tcode{is_convertible_v<const expected<U, G>\&\&, T>} is \tcode{false}; and |
| 7507 | +\tcode{\exposid{converts-from-any-cvref}<T, expected<U, G>>} is \tcode{false}; and |
7533 | 7508 | \item
|
7534 | 7509 | \tcode{is_constructible_v<unexpected<E>, expected<U, G>\&>} is \tcode{false}; and
|
7535 | 7510 | \item
|
|
0 commit comments