[patch] Fix libstdc++/36962

Paolo Carlini paolo.carlini@oracle.com
Fri Sep 5 12:24:00 GMT 2008


Hi Peter,

thanks for your feedback.
>> --- 394,400 ----
>>          _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
>>            typename 
>> std::enable_if<std::is_reference<_Del>::value>::type* = 0)
>>          {
>> !           return new _Sp_counted_deleter<_Tp*, _Del, 
>> std::allocator<_Tp>,
>>              _Lp>(__r.get(), std::ref(__r.get_deleter()));
>>          }
> Interesting observation.
>
> I think that the difference is detectable with get_deleter though.
If you can figure out a possible testcase, I would appreciate that. I 
tried the simplest cases  of template argument ARG for 
std::get_deleter<ARG>(sp); in the unique_ptr_deleter_ref.cc testcase, 
and it compiles, at the very least, or doesn't, in the same way (eg, 
case of D&).

Paolo.



More information about the Libstdc++ mailing list