Boost logo

Boost :

From: Alexander Nasonov (alnsn-mycop_at_[hidden])
Date: 2003-08-19 02:58:44


Google shows me a few links about bit_iterator.

http://lists.boost.org/MailArchives/boost/msg03435.php
http://groups.yahoo.com/group/Boost-Users/message/994

Any progress since these messages have been posted?

Definitely, I have an interest in bit_iterator. But I don't have enough time
to implement it :(
I see two different designs of bit_iterator. It can be implemented as a
class that works with raw memory or as an adaptor to other iterator (which
is dereferenced to integral type).

// Design one
struct bit_iterator
{
    bit_iterator(void* raw_memory);
    bit_iterator& operator++();
    // ...
};

// Design two

template<class Iter> Iter get_iter_for_typeof();

template<class Iter, class T = typeof(*get_iter_for_typeof())>
struct bit_iterator
{
    static_assert<is_integral<T> >;
    bit_iterator(Iter);
    bit_iterator& operator++();
    // ...
};

-- 
Alexander Nasonov
Remove minus and all between minus and at from my e-mail for timely response

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