From: Asger Mangaard (tmb_at_[hidden])
Date: 2005-09-29 04:26:02
>> I'm sorry, but I'm really having a hard time figuring out if you're
>> strickly ironic in your answer or not?
> The only thing remotely ironic in what I wrote was WRT the
> one-versus-two-line declaration. That is, your scheme avoids a
> separate line for the declaration of the impl type, and I was
> noting that it was only marginally better.
That I'm glad to hear. I just wanted to make sure.
>> >> >
>> >> >> The only thing my library does is to initialize the forward
>> >> >> class, using heap or static memory through policies. Also,
>> >> an
>> > What about pimpl types with non-default constructors? I can see
>> > an assignment operator taking an impl *, making your proposed
>> > class like a reseatable smart pointer. That would permit the
>> > client to construct the impl any way necessary and then just hand
>> > it off to your class.
> I'd still like to hear what you have in mind here.
I actually didn't include this in my initial thoughts. Mainly because
pimpl classes will most often be small structs. However, I'm certainly
very fond of your idea. -I'll include it in my library asap.
>> >> The 'already initialized' check is optimal through a policy. The main
>> > I take it you mean that your policy can construct the impl
>> > instance when the pimpl is instantiated and then opt to not check
>> > in the member selection operator? If so, that should probably be
>> > the default mechanism. The policy you describe should be called
>> > something like, "lazy_creation."
> What do you think of this?
I fully agree, and will implement it asap.
>> >> I hope this answers your questions.
>> > It would have been helpful to have listed these things in your
>> > original post.
> Here I was pointing out that your initial points omitted a great
> many details that were necessary for us to understand your
> proposal and took many replies to extract. This, too, was
> prescriptive so that your future messages will be more helpful up
I'm sorry for the lack of information in my initial post, I'll try and
correct this in the future.
So how does this work? Should I now post my library in the vault for peer
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk