Subject: Re: [boost] the 'not' keyword
From: GMan (gmannickg_at_[hidden])
Date: 2011-10-02 16:34:02
On Sun, Oct 2, 2011 at 1:15 PM, Lorenzo Caminiti <lorcaminiti_at_[hidden]>wrote:
> This compiles on GCC but not on MSVC... Why? If you look at the C++
> standard, it says that 'not' is part of the language...
Because MSVC is non-compliant in this regard (surprise surprise).
You can #include <ciso646>, the C++ version of C's <iso646.h>, where the
alternate keywords originated. IIRC (cannot test right now), MSVC will
define the alternate keywords C-style as macros, which is pretty close to
how it should be (you may be able to #undef them). GCC's <ciso646> header is
empty, as it should be. I'm not sure about other compilers.
Do note that the use of these alternate keywords is quite unorthodox, and
can be confusing to those who don't know about them.
-- GMan, Nick Gorski
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk