Boost logo

Boost :

Subject: Re: [boost] interest in a flag library
From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2018-10-26 08:08:03

> On 26. Oct 2018, at 09:35, Andrzej Krzemienski via Boost <boost_at_[hidden]> wrote:
> Hi. I would use a type-safe library for flags. I am missing one today.
> I would rather expect an interface using named functions or indexing
> operator:
> ```
> if (!flags[Flag::READ])
> flags.reset(Flag::EXEC);
> ```

There are std::bitset (fixed size, allocates on the stack) and boost::dynamic_bitset (dynamic size, allocates from stack and heap)

The latter also has more sensible implementations of operator& and operator|. Before you invent a new thing, what is wrong with these classes?

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at