diff --git a/docs/spec/ProFacade.md b/docs/spec/ProFacade.md index 1ca2515..3730e15 100644 --- a/docs/spec/ProFacade.md +++ b/docs/spec/ProFacade.md @@ -12,7 +12,7 @@ A type `F` meets the *ProFacade* requirements of a type `P` if `F` meets the [*P | `F::relocatability` | A [core constant expression](https://en.cppreference.com/w/cpp/language/constant_expression) of type [`constraint_level`](constraint_level.md) that defines the required relocatability of `P`. | | `F::destructibility` | A [core constant expression](https://en.cppreference.com/w/cpp/language/constant_expression) of type [`constraint_level`](constraint_level.md) that defines the required destructibility of `P`. | -*Since 4.0.2*: `P` shall be a pointer-like type eligible for `proxy`. A type `P` is eligible if `P` is not a specialization of `proxy` and the following condition is satisfied: +*Since 4.0.2*: `P` shall be a pointer-like type eligible for `proxy`. A type `P` is eligible if the following condition is satisfied: ```cpp (requires { *std::declval
(); } || requires { typename P::element_type; }) && diff --git a/docs/spec/proxy/assignment.md b/docs/spec/proxy/assignment.md index d3558bc..8934ce1 100644 --- a/docs/spec/proxy/assignment.md +++ b/docs/spec/proxy/assignment.md @@ -38,7 +38,7 @@ Assigns a new value to `proxy` or destroys the contained value. - `(1)` Destroys the current contained value if it exists. After the call, `*this` does not contain a value. - `(2)` Copy assignment operator copies the contained value of `rhs` to `*this`. If `rhs` does not contain a value, it destroys the contained value of `*this` (if any) as if by `auto(rhs).swap(*this)`. The copy assignment is trivial when `F::copyability == constraint_level::trivial` is `true`. - `(3)` Move assignment operator moves the contained value of `rhs` to `*this`. If `rhs` does not contain a value, it destroys the contained value of `*this` (if any). If the move construction throws when `F::relocatability == constraint_level::nontrivial`, `*this` does not contain a value. After move assignment, `rhs` is in a valid state with an unspecified value. The move assignment operator does not participate in overload resolution when `F::copyability == constraint_level::trivial`, falling back to the trivial copy assignment operator. -- `(4)` Let `VP` be `std::decay_t
`. Sets the contained value to an object of type `VP`, direct-non-list-initialized with `std::forward
(ptr)`. Participates in overload resolution only if `VP` is a pointer-like type eligible for `proxy` (see [*ProFacade* requirements](../ProFacade.md)). *Since 3.3.0*: If [`proxiable `. Sets the contained value to an object of type `VP`, direct-non-list-initialized with `std::forward (ptr)`. Participates in overload resolution only if `VP` is not a specialization of `proxy` and is a pointer-like type eligible for `proxy` (see [*ProFacade* requirements](../ProFacade.md)). *Since 3.3.0*: If [`proxiable `. Constructs a `proxy` whose contained value is of type `VP`, direct-non-list-initialized with `std::forward (ptr)`. Participates in overload resolution only if `VP` is a pointer-like type eligible for `proxy` (see [*ProFacade* requirements](../ProFacade.md)).
+- `(4)` Let `VP` be `std::decay_t `. Constructs a `proxy` whose contained value is of type `VP`, direct-non-list-initialized with `std::forward (ptr)`. Participates in overload resolution only if `VP` is not a specialization of `proxy` and is a pointer-like type eligible for `proxy` (see [*ProFacade* requirements](../ProFacade.md)).
- `(5)` Constructs a `proxy` whose contained value is of type `P`, direct-non-list-initialized with `std::forward (); } ||
- requires { typename P::element_type; }) &&
- requires { typename std::pointer_traits ::element_type; })
-struct ptr_traits : applicable_traits {};
-template ::applicable &&
+concept proxiable = facade &&
details::facade_traits ;
template (ptr));
@@ -998,8 +1000,7 @@ class proxy : public details::facade_traits , Args&&... args) noexcept(
std::is_nothrow_constructible_v )
- requires(details::ptr_traits ::applicable &&
- std::is_constructible_v )
+ requires(details::pointer_like && std::is_constructible_v )
{
initialize (std::forward ::applicable &&
+ requires(details::pointer_like &&
std::is_constructible_v &, Args...>)
{
initialize (il, std::forward &&
F::destructibility >= constraint_level::nothrow)
- requires(details::ptr_traits ::applicable &&
- std::is_constructible_v &&
+ requires(details::pointer_like && std::is_constructible_v &&
F::destructibility >= constraint_level::nontrivial)
{
reset();
@@ -1138,7 +1139,7 @@ class proxy : public details::facade_traits &, Args...> &&
F::destructibility >= constraint_level::nothrow)
- requires(details::ptr_traits ::applicable &&
+ requires(details::pointer_like &&
std::is_constructible_v &, Args...> &&
F::destructibility >= constraint_level::nontrivial)
{
@@ -1146,7 +1147,9 @@ class proxy : public details::facade_traits (il, std::forward