Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2008-01-18 03:50:28


Ingolf, thanks for your review.

John Torjo wrote:
> Hi, John.
>
> 2008/1/14, John Torjo <john.groups_at_[hidden]>:
>> * What is your evaluation of the design?
>
> Some questions:
> 1. Shouldn't there be a protected d'tor in singleton in order to
> reduce the chance of mis-use (deletion via pointer to singleton)?

Good point. I think that's possible.

>
> 2. Why does instance have pointer-like (rather than reference-like)
> syntax? I know that GoF use pointers, but references typically make me
> feel better than pointers (or something that looks like one) which
> might be 0.
>

Because "operator->" can be overloaded and "operator." can not.

> 3. Is a private (or protected) my_singleton destructor supported
> without 'verbose "template...friend-making"'?

No. And I don't think it's possible without 'verbose "template..friend-
making".

>> * What is your evaluation of the potential usefulness of the library?
>
> I'd very much like to see this kind of library in boost. This one
> looks promising.
>

Thanks.

>> * Do you think the library should be accepted as a Boost library?
>
> I'd like to see the above issues addressed in some way. Apart from
> that, I have no objections.

I think that's possible.

Regards,
Tobias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk