I wanted to open a PR for these but it seems that the proposal isn't open-sourced.
I've found some issues in the latest proposal for now (P3086R5).
- The term "trivial type" is deprecated by P3247R2. Instead of saying "
X is a trivial type", perhaps we should say "is_trivially_copyable_v<X> and is_trivially_default_constructible_v<X> are both true".
- The "Constraints" element ([structure.specifications]/3.1) is not used.
- The "Require" element has been removed from [structure.specifications]. Given its only usage specifies conditions entirely detectible at compile time, it should be replaced with "Mandates".
- Given
constraint_level is a scoped enumeration type, its underlying type is fixed and implicit specified as int per the current wording, and hence a value larger than constraint_level::trivial or less than constraint_level::none (e.g. constraint_level(127) or constraint_level(-1) respectively) can be valid. Perhaps we don't want to accidently make such a value have valid effect.
E.g. I think it's clearer to specify the copy and move constructors as following.
proxy(const proxy& rhs) noexcept(F::copyability == constraint_level::trivial || F::copyability == constraint_level::nothrow);
-?-. Effects: If rhs contains a value of type P, direct-non-list-initializes the contained value of the constructed object with a const P lvalue that refers to rhs’s contained value. Otherwise, constructs an empty proxy.
-?-. Remarks: This constructor is trivial if F::copyability == constraint_level::trivial is true, and deleted if F::copyability == constraint_level::trivial, F::copyability == constraint_level::nothrow, F::copyability == constraint_level::nontrivial are all false.
[Drafting note: It is redundant to say a trivial copy constructor performs a bitwise copy.]
proxy(proxy&& rhs) noexcept(F::relocatability == constraint_level::nothrow);
-?-. Constraints: Either F::relocatability == constraint_level::nontrivial or F::copyability == constraint_level::nothrow is true.
-?-. Effects: If rhs contains a value of type P, moves its contained value into the constructed object (using either a move construction of P or an implementation-defined trivial relocation when permitted by the constraint levels). Otherwise, constructs an empty proxy.
-?-. Postconditions: rhs does not contain a value.
I wanted to open a PR for these but it seems that the proposal isn't open-sourced.
I've found some issues in the latest proposal for now (P3086R5).
Xis a trivial type", perhaps we should say "is_trivially_copyable_v<X>andis_trivially_default_constructible_v<X>are bothtrue".constraint_levelis a scoped enumeration type, its underlying type is fixed and implicit specified asintper the current wording, and hence a value larger thanconstraint_level::trivialor less thanconstraint_level::none(e.g.constraint_level(127)orconstraint_level(-1)respectively) can be valid. Perhaps we don't want to accidently make such a value have valid effect.E.g. I think it's clearer to specify the copy and move constructors as following.
[Drafting note: It is redundant to say a trivial copy constructor performs a bitwise copy.]