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
> if (!flags[Flag::READ])
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?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk