|
Boost : |
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-06-05 11:34:46
Maarten Kronenburg wrote:
> Rene,
> The user can define an iterator with
> the bit access functions
> highest_bit and get_sub.
OK, so there's an equivalent to size(). Which the iterator code I posted
earlier would have to manipulate into the iteration interval.
> The get_sub is O(1) when nbits is limited.
> Then the user must define what is iterated
> over, bits or bytes or words or...
No they don't, if you don't want them to. You can define a fixed unit
your class iterates over. And even if you wanted the user to define what
is iterated over you could make just the method that returns the
pointers/iterators templated.
> The integer class is not a template,
> because templates do not provide
> run-time polymorphism.
Reasoning, see circular.
I guess I won't plan on switching from Botan's
<http://botan.randombit.net> BigInteger class. Oh well, you win some you
loose some :-\
<http://boost.org/more/discussion_policy.htm#effective>
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk