[dynamic_bitset] capacity(), reserve(), shrink_to_fit()

Hi, I have implemented capacity(), reserve(), and shrink_to_fit() for dynamic_bitset. I find these useful and am surprised by their omission. I'm wondering if there is any interest in including them in Boost. Perhaps there are reasons why they're not implemented? Riccardo -- View this message in context: http://boost.2283326.n4.nabble.com/dynamic-bitset-capacity-reserve-shrink-to... Sent from the Boost - Dev mailing list archive at Nabble.com.

I'm interested on these.
Could you please submit a pull-request on github?
On Sat, Oct 11, 2014 at 1:10 AM, Riccardo Marcangelo
Hi,
I have implemented capacity(), reserve(), and shrink_to_fit() for dynamic_bitset. I find these useful and am surprised by their omission. I'm wondering if there is any interest in including them in Boost. Perhaps there are reasons why they're not implemented?
Riccardo
-- View this message in context: http://boost.2283326.n4.nabble.com/dynamic-bitset-capacity-reserve-shrink-to... Sent from the Boost - Dev mailing list archive at Nabble.com.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Gonzalo BG wrote
I'm interested on these.
Could you please submit a pull-request on github?
Thanks for the interest. I'd be happy to submit a pull-request on GitHub if there are no objections. It may take me a few days to write up the documentation and implement tests. Kind regards, Riccardo -- View this message in context: http://boost.2283326.n4.nabble.com/dynamic-bitset-capacity-reserve-shrink-to... Sent from the Boost - Dev mailing list archive at Nabble.com.

Sorry for the delay. I've completed the documentation and tests. For shrink_to_fit() I'm currently using the old "swap trick" on the underlying std::vector. It would be preferable to call the vector::shrink_to_fit() member function if it exists (e.g. by using a macro) although I'm not sure what the protocol is for this in Boost. Kind regards, Riccardo. -- View this message in context: http://boost.2283326.n4.nabble.com/dynamic-bitset-capacity-reserve-shrink-to... Sent from the Boost - Dev mailing list archive at Nabble.com.
participants (2)
-
Gonzalo BG
-
Riccardo Marcangelo