
"Ben Artin" <macdev@artins.org> wrote in message news:macdev-641F43.15244027052006@sea.gmane.org...
In article <e56qh0$lu2$1@sea.gmane.org>, "Maarten Kronenburg" <M.Kronenburg@inter.nl.net> 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. --Beman