Boost logo

Boost :

Subject: Re: [boost] safe-bool CRTP class
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-05-28 01:59:59


On Sat, May 28, 2011 at 12:29 AM, Gottlob Frege <gottlobfrege_at_[hidden]>wrote:
>
> ie __LINE__ and __FILE__ or __COUNTER__ etc? All the more reason for
> the macro, I suppose.

You can just base the type off of some nested type that's created by the
macro. Also, the CRTP approach handles this fine as well (you just form the
type using the child parameter).

That said, I, too, have used a hand-rolled macro version in the past. Given
that so many of us have done either the CRTP or macro approach at some
point, something should probably make its way into boost, outside of detail.

-- 
-Matt Calabrese

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