Boost logo

Boost :

Subject: Re: [boost] [Review] Formal Review: Boost.Move
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-05-16 11:35:55


----- Original Message -----
From: "Mathieu -" <ptr.jetable_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, May 16, 2010 12:46 PM
Subject: Re: [boost] [Review] Formal Review: Boost.Move

>
> On 16 May 2010 12:24, vicente.botet <vicente.botet_at_[hidden]> wrote:
>
>>>> * BTW, why BOOST_RV_REF_2_TEMPL_ARGS and BOOST_RV_REF_3_TEMPL_ARGS are needed?
>>>>
>>>
>> >Consider what the preprocessor would make of BOOST_RV_REF( tmpl< T, U >
>> >)...oops! The preprocessor thinks you're passing 2 parameters to
>> >BOOST_RV_REF :(
>
>>Sorry, I have not tried this, but does BOOST_RV_REF(( tmpl< T, U > )) fails?
>
> That's what I tried ( unfortunately AFTER posting :/), but it doesn't
> work with types because the macro expand to something like :
>
> ::boost::rv<(tmpl<T,U>)> which is an invalid template argument..

:( I have no tested it neither before posting. We have then the possibility to write

BOOST_RV_REF_2_TEMPL_ARGS(Tmpl, A1, A2)

or

typename rvalue_ref<Tmpl<A1,A2> >::type

I prefer to write code that doesn't use macros as far as it is possible.

Best,
Vicente


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