Skip to content

Commit

Permalink
Sort constraints, remove needless constraints (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcoe authored Jan 28, 2025
1 parent 0c571d8 commit 3ee027a
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions DRAFT.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ should not be considered in isolation.

* Add a second clarifying example to tagged constructors explanatory text.

* Remove constraint `is_same_v<U, polymorphic>` is `false` on polymorphic constructors
taking `in_place_type_t` and an intializer list.

* Order `polymorphic` constructor constraints consistently.

* Remove needless introduction of `UU` in `indirect` constraints.

## Changes in R12

* Fix `indirect` synopsis to include `explicit` on the default constructor.
Expand Down Expand Up @@ -1129,8 +1136,8 @@ constexpr indirect& operator=(indirect&& other) noexcept(
constexpr indirect& operator=(U&& u);
```

10. _Constraints_: Where `UU` is `remove_cvref_t<U>`,
* `is_same_v<UU, indirect>` is `false`,
10. _Constraints_:
* `is_same_v<remove_cvref_t<U>, indirect>` is `false`,
* `is_constructible_v<T, U>` is `true`, and
* `is_assignable_v<T&, U>` is `true`.

Expand Down Expand Up @@ -1487,8 +1494,8 @@ explicit constexpr polymorphic(U&& u);
10. _Constraints_: Where `UU` is `remove_cvref_t<U>`,
* `is_same_v<UU, polymorphic>` is `false`,
* `derived_from<UU, T>` is `true`,
* `is_copy_constructible_v<UU>` is `true`,
* `is_constructible_v<UU, U>` is `true`,
* `is_copy_constructible_v<UU>` is `true`,
* `UU` is not a specialization of `in_place_type_t`, and
* `is_default_constructible_v<Allocator>` is `true`.

Expand All @@ -1503,8 +1510,8 @@ explicit constexpr polymorphic(allocator_arg_t, const Allocator& a, U&& u);
12. _Constraints_: Where `UU` is `remove_cvref_t<U>`,
* `is_same_v<UU, polymorphic>` is `false`,
* `derived_from<UU, T>` is `true`,
* `is_copy_constructible_v<UU>` is `true`,
* `is_constructible_v<UU, U>` is `true`, and
* `is_constructible_v<UU, U>` is `true`,
* `is_copy_constructible_v<UU>` is `true`, and
* `UU` is not a specialization of `in_place_type_t`.
13. _Effects_: `alloc` is direct-non-list-initialized with `a`. Constructs
Expand Down Expand Up @@ -1550,10 +1557,9 @@ explicit constexpr polymorphic(in_place_type_t<U>,

18. _Constraints_:
* `is_same_v<remove_cvref_t<U>, U>` is `true`,
* `is_same_v<U, polymorphic>` is `false`,
* `derived_from<U, T>` is `true`,
* `is_copy_constructible_v<U>` is `true`,
* `is_constructible_v<U, initializer_list<I>&, Us...>` is `true`, and
* `is_constructible_v<U, initializer_list<I>&, Us...>` is `true`,
* `is_copy_constructible_v<U>` is `true`, and
* `is_default_constructible_v<Allocator>` is `true`.

19. _Effects_: Constructs an owned object of type `U` with the arguments
Expand All @@ -1568,10 +1574,9 @@ explicit constexpr polymorphic(allocator_arg_t, const Allocator& a,
20. _Constraints_:
* `is_same_v<remove_cvref_t<U>, U>` is `true`,
* `is_same_v<U, polymorphic>` is `false`,
* `derived_from<U, T>` is `true`,
* `is_copy_constructible_v<U>` is `true`, and
* `is_constructible_v<U, initializer_list<I>&, Us...>` is `true`.
* `is_constructible_v<U, initializer_list<I>&, Us...>` is `true`, and
* `is_copy_constructible_v<U>` is `true`.
21. _Effects_: `alloc` is direct-non-list-initialized with `a`.
Constructs an owned object of type `U` with the arguments `ilist`,
Expand Down

0 comments on commit 3ee027a

Please sign in to comment.