Subject: Re: [boost] [smart_ptr] Interest in the missing smart pointer (that can target the stack)
From: Noah (duneroadrunner_at_[hidden])
Date: 2016-02-05 02:18:21
On 2/4/2016 2:45 AM, Rob Stewart wrote:
>>> Adding a separate class or policy just to have the
>>> uninitialized case is heavy, but the overload may not apply to all
>>> specializations of the template.
>> Yeah, I'm not sure either. Separate classes does seem heavy. But at
>> least it's compile-time heavy, not run-time.
> I meant that users have to know about more types and how to select among them or infer a programmer's intent from their use.
Oh, I see. The mental tax. Hmm, I don't know. To you the extra
constructor seems conceptually simpler, but to me it was less intuitive
than the solution of separate classes. Relative "heaviness" might be
On the safe numerics thread they pointed out that adding a separate
constructor actually changes the interface to be incompatible with the
interface of native types. And they didn't seem to like that.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk