unique_ptr::get_deleter

Chris Fairles chris.fairles@gmail.com
Tue Mar 2 16:16:00 GMT 2010


On Tue, Mar 2, 2010 at 9:03 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>> Does anyone remember why our unique_ptr::get_deleter is defined as
>>
>> typename std::add_lvalue_reference<deleter_type>::type
>> get_deleter();
>>
>> rather than the simpler:
>>
>> deleter_type&
>> get_deleter();
>>
> unless Chris replies something over the next day or so, I say let's
> clean up that, I don't see anything wrong with simply implementing the
> letter of the WD.
>
> Thanks,
> Paolo.
>

Can't think of any particular reason off the top of my head. If test
cases pass, giv'r.

Chris



More information about the Libstdc++ mailing list