This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3 PATCH] Implement N4089 and N4387


On 19 July 2015 at 20:14, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
> On 19 July 2015 at 20:13, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
>> Minor changelog fix, the single-pointer functions aren't constrained with
>> array compatibility, but with deleter compatibility.
>
> And that should be single-object, not single-pointer, not that it has any
> effect on the corrected changelog. :)

Argh, the paper number in the status table was wrong, although the
link was correct,
so the paper number for the missing sfinae condition in the changelog
was also wrong.

2015-07-19  Ville Voutilainen  <ville.voutilainen@gmail.com>
    Implement N4089 Safe conversions in unique_ptr<T[]> (LWG 2118)
    and N4366 LWG 2228: Missing SFINAE rule in unique_ptr
    templated assignment
    * include/bits/unique_ptr.h
    (__remove_cv, __is_derived_Tp): Remove.
    (default_delete::default_delete(const default_delete<_Up[]>)):
    Constrain with array convertibility.
    (default_delete::operator(_Up*)): Turn into a template,
    constrain with array convertibility.
    (__safe_conversion_up): New, single object version.
    (unique_ptr(unique_ptr<_Up, _Ep>&& __u)): Constrain with deleter
    convertibility.
    (unique_ptr::operator=(unique_ptr<_Up, _Ep>&& __u)): Likewise, and add
    is_assignable as a constraint.
    (__safe_conversion_up): Array version, renamed from __safe_conversion,
    updated to implement N4089.
    (__safe_conversion_raw): New.
    (unique_ptr(_Up __p)): Turn into a template, constrain with array
    convertibility.
    (unique_ptr(_Up __p,
        typename conditional<is_reference<deleter_type>::value,
        deleter_type, const deleter_type&>::type __d)): Likewise.
    (unique_ptr(_Up __p, typename
     remove_reference<deleter_type>::type&& __d)): Likewise.
    (unique_ptr(unique_ptr<_Up, _Ep>&& __u)): Likewise.
    (operator=(unique_ptr<_Up, _Ep>&& __u)): Likewise, and add
    is_assignable as a constraint (array version).
    (reset(_Up __p)): Turn into a template, constrain with array
    convertibility.
    (reset(nullptr_t p)): New.
    * testsuite/20_util/default_delete/48631_neg.cc: Adjust.
    * testsuite/20_util/unique_ptr/assign/48635.cc: Likewise.
    * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Likewise.
    * testsuite/20_util/unique_ptr/assign/cv_qual.cc: Likewise.
    * testsuite/20_util/unique_ptr/cons/cv_qual.cc: Likewise.
    * testsuite/20_util/unique_ptr/dr2228.cc: New.
    * testsuite/20_util/unique_ptr/modifiers/cv_qual.cc: Adjust.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]