
On 9/4/2025 11:33 AM, Gennaro Prota wrote: [...]
2. A function similar to find_first, but for locating the first "off" bit.
Hmm... I'll implement that. Thanks for the suggestion :-).
I'm thinking of a way to avoid introducing a new member function for that. Adding a (defaulted) bool parameter to the existing find_first()'s, like this: size_type find_first( bool value = true ) const; size_type find_first( size_type pos, bool value = true ) const; would make a call like b.find_first( 1 ) ambiguous. An idea could be: enum class bit_value { set, unset }; size_type find_first( bit_value value = bit_value::set ) const; size_type find_first( size_type pos, bit_value value = bit_value::set ) const; but that would be inconsistent with the rest of the library. -- Gennaro Prota <https://prota.dev>