|
Boost : |
Subject: Re: [boost] safe-bool CRTP class
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2011-05-28 00:29:43
On Fri, May 27, 2011 at 4:19 PM, Stephan T. Lavavej
<stl_at_[hidden]> wrote:
> [Steven Watanabe]
>> What about a macro that can be used like
>> BOOST_EXPLICIT_BOOL_OPERATOR() const {
>> return ...;
>> }
>
> Having done this in the STL, I can offer the following warning: you'll need to generate a different fake-bool type for every class, otherwise things will be [in]equality comparable that should not be.
>
> STL
ie __LINE__ and __FILE__ or __COUNTER__ etc? All the more reason for
the macro, I suppose.
Tony
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk