|
3970 | 3970 | \tcode{allocate_shared} shall initialize this (sub)object
|
3971 | 3971 | via the expression
|
3972 | 3972 | \begin{itemize}
|
3973 |
| - \item \tcode{allocator_traits<A2>::construct(a2, pv, v)} or |
3974 |
| - \item \tcode{allocator_traits<A2>::construct(a2, pv, l...)} |
| 3973 | + \item \tcode{allocator_traits<A2>::construct(a2, pu, v)} or |
| 3974 | + \item \tcode{allocator_traits<A2>::construct(a2, pu, l...)} |
3975 | 3975 | \end{itemize}
|
3976 | 3976 | respectively,
|
3977 |
| - where \tcode{pv} points to storage |
3978 |
| - suitable to hold an object of type \tcode{U} and |
3979 |
| - \tcode{a2} of type \tcode{A2} is a rebound copy of |
3980 |
| - the allocator \tcode{a} passed to \tcode{allocate_shared} |
3981 |
| - such that its \tcode{value_type} is \tcode{remove_cv_t<U>}. |
| 3977 | + where \tcode{pu} is a pointer of type \tcode{remove_cv_t<U>*} |
| 3978 | + pointing to storage |
| 3979 | + suitable to hold an object of type \tcode{remove_cv_t<U>} and |
| 3980 | + \tcode{a2} of type \tcode{A2} is a potentially rebound copy of |
| 3981 | + the allocator \tcode{a} passed to \tcode{allocate_shared}. |
3982 | 3982 | \item
|
3983 | 3983 | When a (sub)object of non-array type \tcode{U} is specified to have
|
3984 | 3984 | a default initial value,
|
|
3989 | 3989 | \item
|
3990 | 3990 | When a (sub)object of non-array type \tcode{U} is specified to have
|
3991 | 3991 | a default initial value,
|
3992 |
| - \tcode{allocate_shared} shall initialize this (sub)object |
3993 |
| - via the expression \tcode{allocator_traits<A2>::construct(a2, pv)}, |
3994 |
| - where \tcode{pv} points to storage |
3995 |
| - suitable to hold an object of type \tcode{U} and |
3996 |
| - \tcode{a2} of type \tcode{A2} is a rebound copy of |
3997 |
| - the allocator \tcode{a} passed to \tcode{allocate_shared} |
3998 |
| - such that its \tcode{value_type} is \tcode{remove_cv_t<U>}. |
| 3992 | + \tcode{allocate_shared} initializes this (sub)object |
| 3993 | + via the expression \tcode{allocator_traits<A2>::construct(a2, pu)}, |
| 3994 | + where \tcode{pu} is a pointer of type \tcode{remove_cv_t<U>*} |
| 3995 | + pointing to storage |
| 3996 | + suitable to hold an object of type \tcode{remove_cv_t<U>} and |
| 3997 | + \tcode{a2} of type \tcode{A2} is a potentially rebound copy of |
| 3998 | + the allocator \tcode{a} passed to \tcode{allocate_shared}. |
3999 | 3999 | \item
|
4000 | 4000 | When a (sub)object of non-array type \tcode{U} is initialized by
|
4001 | 4001 | \tcode{make_shared_for_overwrite} or\linebreak % avoid Overfull
|
|
4015 | 4015 | that was initialized by \tcode{make_shared},
|
4016 | 4016 | \tcode{make_shared_for_overwrite}, or \tcode{allocate_shared_for_overwrite}
|
4017 | 4017 | is to be destroyed,
|
4018 |
| - it is destroyed via the expression \tcode{pv->\~{}U()} where |
4019 |
| - \tcode{pv} points to that object of type \tcode{U}. |
| 4018 | + it is destroyed via the expression \tcode{pu->\~{}U()} where |
| 4019 | + \tcode{pu} points to that object of type \tcode{U}. |
4020 | 4020 | \item
|
4021 | 4021 | When a (sub)object of non-array type \tcode{U}
|
4022 | 4022 | that was initialized by \tcode{allocate_shared} is to be destroyed,
|
4023 | 4023 | it is destroyed via the expression
|
4024 |
| - \tcode{allocator_traits<A2>::destroy(a2, pv)} where |
4025 |
| - \tcode{pv} points to that object of type \tcode{remove_cv_t<U>} and |
4026 |
| - \tcode{a2} of type \tcode{A2} is a rebound copy of |
4027 |
| - the allocator \tcode{a} passed to \tcode{allocate_shared} |
4028 |
| - such that its \tcode{value_type} is \tcode{remove_cv_t<U>}. |
| 4024 | + \tcode{allocator_traits<A2>::destroy(a2, pu)} where |
| 4025 | + \tcode{pu} is a pointer of type \tcode{remove_cv_t<U>*} |
| 4026 | + pointing to that object of type \tcode{remove_cv_t<U>} and |
| 4027 | + \tcode{a2} of type \tcode{A2} is a potentially rebound copy of |
| 4028 | + the allocator \tcode{a} passed to \tcode{allocate_shared}. |
4029 | 4029 | \end{itemize}
|
4030 | 4030 | \begin{note}
|
4031 | 4031 | These functions will typically allocate more memory than \tcode{sizeof(T)} to
|
|
0 commit comments