Is there a clean way to return the reverse ordering of a boost::dynamic_bitset object?
For example:
01001100
becomes
00110010.
The simplest solution I can think of is to convert the bitset to a string, reverse the string and convert it back to a bitset, but this seems a rather slow method that nullifies the speed of bitstring operations.
Thank you in advance!

boost::dynamic_bitsetdoesn't have iterators, so a long range of comfy STL solutions like, off the top of my head,std::reverseorstd::swapor theirboostcounterparts are not available, I reckon that a good way would be to make your own trivial reverse method:Output:
Live demo