Boost logo

Boost :

From: Maarten Kronenburg (M.Kronenburg_at_[hidden])
Date: 2006-05-26 07:30:58


Martin,
See my reply to Gerhard.
Regards, Maarten.

"Martin Bonner" <martin.bonner_at_[hidden]> wrote in message
news:D997BF79D1E92C4793B7FCC04B4F90A555D1A0_at_pigeon.pi.local...
> Gerhard Wesp Sent:
>
> > On Thu, May 25, 2006 at 04:41:32PM +0200, Maarten Kronenburg wrote:
> >> Users can implement an unsigned_integer by deriving from
> >> integer, but this will not give any performance gain.
> >
> > This would violate Item 32 in Effective C++, 3rd ed. by Scott Meyers:
> > Make sure public inheritance models "is-a".
>
> I agree it's not a good idea.
>
> > I suggest deriving from integer be disallowed in the TR2 proposal.
>
> ... however I don't think that is. If C++ had "final", then it could be
> compile time checked. As it is, I don't think TR2 could do more than
> make it undefined behaviour. We really don't want more undefined
> behaviour in C++ if we can avoid it. What is more, deriving from
> integer would actually work on all implementations (as far as public
> inheritance which doesn't model "is-a" works).
>
>
> --
> Martin Bonner
> Martin.Bonner_at_[hidden]
> Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ,
> ENGLAND Tel: +44 (0)1223 203894
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


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