On 1/1/13, Geoffrey Romer wrote:
> AFAICT there's no way to distinguish between safe and unsafe
> conversions of user-defined pointers, because that's a property
> of the pointer implementation, not the type itself. My PR errs on
> the side of trusting the implementation to provide only correct
>
On 1/1/13, Jonathan Wakely wrote:
> On 1 January 2013 20:40, Lawrence Crowl wrote:
>> That was pilot error on my part. However, I've been having trouble
>> when the argument to the constructor or reset has a conversion
>> operator. The code does distinquish between a safe conversion to
>> base a
On 1 January 2013 20:40, Lawrence Crowl wrote:
>
> That was pilot error on my part. However, I've been having trouble
> when the argument to the constructor or reset has a conversion
> operator. The code does distinquish between a safe conversion to
> base and an unsafe conversion to derived.
>
>
On 12/28/12, Jonathan Wakely wrote:
> On 28 December 2012 01:51, Lawrence Crowl wrote:
>> I'm not getting errors when converting from derived to base.
>> E.g. the following compiles, when it should not.
>>
>> std::unique_ptr acb_ad(new derived[3]);
>
> I get an error:
>
> shm$ cat up.cc
> #include
On 28 December 2012 01:51, Lawrence Crowl wrote:
>
> I'm not getting errors when converting from derived to base.
> E.g. the following compiles, when it should not.
>
> std::unique_ptr acb_ad(new derived[3]);
I get an error:
shm$ cat up.cc
#include
struct base { };
struct derived : base { virtua
On 12/20/12, Jonathan Wakely wrote:
> This patch started when I noticed that it's not possibly to construct
> a shared_ptr from unique_ptr, then I discovered we don't
> use D::pointer if it exists, and there were a number of other
> non-conformance issues with our std::unique_ptr. I ended up
> fi
This patch started when I noticed that it's not possibly to construct
a shared_ptr from unique_ptr, then I discovered we don't
use D::pointer if it exists, and there were a number of other
non-conformance issues with our std::unique_ptr. I ended up
fixing them by implementing Geoffrey's proposed r