
28 May
2011
28 May
'11
9:19 p.m.
On Sat, May 28, 2011 at 1:41 PM, Stephan T. Lavavej < stl@exchange.microsoft.com> wrote:
[Jeffrey Lee Hellrung, Jr.]
struct _boost_explicit_operator_bool_struct { int _dummy; int member; }; \
You don't need two data members.
According to Andrey Semashev (to whom I credit the technique to, and should've cited in the above post), you do need two data members, as some compilers interpret a pointer-to-first-member as equal to 0 (i.e., convertible to false). I honestly don't know if such compilers exist or are technically allowed to do that... - Jeff