From: Beman Dawes (bdawes_at_[hidden])
Date: 2006-05-27 16:59:55
"Ben Artin" <macdev_at_[hidden]> wrote in message
> In article <e56qh0$lu2$1_at_[hidden]>,
> "Maarten Kronenburg" <M.Kronenburg_at_[hidden]> wrote:
>> And as mentioned in my reply to Gerhard,
>> every unsigned integer is an integer, so there
>> is every reason to choose this design.
> If you believe that every unsigned integer is an integer, you should read
> Effective C++. Item 35, "Make sure public inheritance models 'isa'"
In the 3rd edition, "Make sure public inheritance models 'isa'" is item 32.
> until you stop believing it.
What specific operations are you saying that the integer class supports but
C++ unsigned integer class doesn't support? Meyer's Bird/Penguin flying
argument only applies if there are operations supported by integers but not
by unsigned integers, AFAIK.
If in fact such operations exist, then it would be better to derive both
from a common base class. But we need to know the specifics.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk