jbcoe / value_types

value types for composite class design - with allocators
MIT License
37 stars 13 forks source link

Amend wording after discussion with Jonathan Wakely #398

Closed jbcoe closed 7 months ago

jbcoe commented 7 months ago

We already mention allocators in: Class template polymorphic general [polymorphic.general]

_In every specialization polymorphic<T, Allocator>, if the type allocator_traits<Allocator>::value_type is not the same type asT, the program is ill-formed. Every object of type polymorphic<T, Allocator> uses an object of type Allocator to allocate and free storage for the owned object as needed. The owned object is constructed using the function allocator_traits<allocator_type>::rebind_traits<U>::construct and destroyed using the function allocator_traits<allocator_type>::rebind_traits<U>::destroy, where U is either allocator_type::value_type or an internal type used by the polymorphic value._

There is, perhaps, no need to mention allocators again for individual constructors.

jbcoe commented 7 months ago

As far as I can see the changes look good. Seems to be quite a bit of noise created by trivial formatting changes (line wrapping text), it would be useful in future to separate these out from actual changes to text.

Agreed. This PR got too big too fast. Thanks for review.