Boost logo

Boost :

Subject: Re: [boost] Is there any interest in type-safe container of bool flags with noexcept guarantees?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-03-21 18:23:59


AMDG

On 03/21/2017 10:31 AM, Роман Орлов via Boost wrote:
>
> <snip>
> class eats_meat;
> class eats_grass;
> class has_tail;
> Then bind these types to flag identifiers
> typedef typed_flags<eats_meat, eats_grass, has_tail> animal;
>

what's wrong with
struct animal {
  bool eats_meat : 1;
  bool eats_grass : 1;
  bool has_tail : 1;
};

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk