Boost logo

Boost :

Subject: Re: [boost] [wave] preprocessor directives in output
From: Joel de Guzman (djowel_at_[hidden])
Date: 2014-01-21 18:03:17


On 1/22/14, 3:16 AM, Eric Niebler wrote:

> I figured this out. Using Paul's trick, I can do this:
>
> #define FUSION_HASH
>
> #if defined(__WAVE__) && \
> defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
> FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
> #endif
> #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
> (defined(__WAVE__) && \
> defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
> vector(vector&& rhs)
> : vec(std::forward<vector_n>(rhs.vec)) {}
> // more code that uses rvalue references
> #endif
> #if defined(__WAVE__) && \
> defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
> FUSION_HASH endif
> #endif
>
> #undef FUSION_HASH
>
> Ugly as sin, but it seems to give the desired results.

Very clever indeed. Wow, I'm impressed. Yes, it is ugly, but if it gets
the job done, then that's cool!

Thank you for looking into this, Eric!

Regards,

-- 
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/

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