From: Ken Hagan (K.Hagan_at_[hidden])
Date: 2004-05-19 02:37:55
> Ian Baxter wrote:
>> Microsoft's macro hacks in the iso646.h header unfortunately kills
>> the current MPL implementation. The headers or.hpp, and.hpp are
>> substituted as ||.hpp, &&.hpp!
Eric Niebler wrote:
> I don't think changing the header names is the right solution. Since
> you're on VC7, you can use the push_macro and pop_macro pragmas to
> work around the issue.
> // file: or_.hpp
> #pragma once
> #pragma push_macro("or")
> #include <boost/mpl/or.hpp>
> #pragma pop_macro("or")
Nice workaround, but it won't help you much if you are using a library
that uses MPL. Renaming the header will upset everyone's sense of
aesthetics, but resolves the problem once and for all.
Incidentally, I assume VC7 is looking at
and macro expanding the "or". The standard text for preprocessing phase
4 does indeed begin "Preprocessing directives are executed and macro
invocations are expanded.", but the text for phase 3 begins "The source
file is decomposed into preprocessing tokens..." and I would have
that "boost/mpl/or.hpp" (without the quotes) was a single
in this context so there is no invocation of the "or" macro here.
at least one of "me" and "VC" must be wrong here.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk