|
Boost : |
Subject: Re: [boost] Dynamic_bitset and access to underlying storage
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-06-29 04:36:43
Zitat von Paul Fee <pfee_at_[hidden]>:
>> I need to use a bitset with contiguous storage so that I can pass it to
>> a system call. Although I can't see it in the documentation, I know from
>> reading the code, that dynamic bitset is implemented in terms of
>> std::vector.
>>
>> Also, whilst I don't need the run time resizing that dynamic bitset
>> provides, I do need to be able to use up to at least 64K bits,
>>
>> So, is there any chance of an additional member function+ that returns a
>> pointer to the zero'eth element of the underlying vector?
>>
>
> I encountered a similar problem when trying to serialize an object that had
> a dynamic_bitset as a member.
I encountered a similar problem when trying to use another vector
implementation (similar to auto_buffer in the review queue) with
dynamic_bitset.
all of these problems could be solved if dynamic_bitset was changed
into a container adapter similar to std::stack and leave the
underlying container to the user.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk