Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-08-21 12:06:20


Jens Maurer wrote:

>...
>
>Interface
>---------
>
> - regbase::flag_type is a bitmask type, but it does not define
>the appropriate operators | & etc. regbase::flags() returns the
>wrong type. For example, this code fails:
>
> using boost::regbase;
> regbase::flag_type f = regbase::use_except |
regbase::newline_alt;
>
>Look at iostream's flags how to do it correctly.

It is written up in the standard's library front matter. See 17.3.2.1.2
Bitmask types [lib.bitmask.types].

It might be nice for boost/operators.hpp to support this idiom, but I don't
see how to do that in a way that provides the non-member functions when
desired, but only if explicitly requested.

--Beman


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