Boost logo

Boost :

Subject: Re: [boost] safe-bool CRTP class
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2011-05-27 13:27:57


[Krzysztof Czainski]
> typedef void (boolable::*unspecified_bool_t)();

Note: VC9 and earlier generated terrible code for pointer-to-member-function fake bools, while they generated nearly ideal code for pointer-to-data-member fake bools. While VC10 and later generate nearly ideal code for both, for VC you may as well use pointer-to-data-member all the time. (I don't know about other compilers' codegen.)

Stephan T. Lavavej
Visual C++ Libraries Developer


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