Boost logo

Boost :

Subject: Re: [boost] [wave] preprocessor directives in output
From: Fletcher, John P (j.p.fletcher_at_[hidden])
Date: 2014-01-21 11:25:12


Eric

Could that second use case use a different copy of the code?

John

-----Original Message-----
From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Eric Niebler
Sent: 21 January 2014 16:13
To: boost_at_[hidden]
Subject: Re: [boost] [wave] preprocessor directives in output

On 1/20/2014 11:27 PM, pmenso57_at_[hidden] wrote:
> Provided the code was only in an #if block used for pre-generation (or the code is *only* used for pre-gen), you could have wave produce that. E.g. use an object-like macro to get a non-macro-operator hash mark:
>
>
> #if PREGENERATING_HEADERS
> #define HASH #
> HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
> vector(vector&& rhs)
> : vec(std::forward<vector_n>(rhs.vec)) {} HASH endif #endif

Clever, but sadly the code is not only used for pregeneration. It's possible to compile Fusion with the "don't use preprocessed headers"
flag, in which case this header gets used directly.

<sigh>

--
Eric Niebler
Boost.org
http://www.boost.org
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

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