Boost logo

Boost :

Subject: Re: [boost] [Boost-commit] svn:boost r67745 - trunk/boost/fusion/container/list/detail
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-01-06 20:28:10


AMDG

On 1/6/2011 5:17 PM, marshall_at_[hidden] wrote:
> Author: marshall
> Date: 2011-01-06 20:17:40 EST (Thu, 06 Jan 2011)
> New Revision: 67745
> URL: http://svn.boost.org/trac/boost/changeset/67745
>
> Log:
> Applied patch; refs #2823; will merge to release once tests cycle
> Text files modified:
> trunk/boost/fusion/container/list/detail/build_cons.hpp | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> Modified: trunk/boost/fusion/container/list/detail/build_cons.hpp
> ==============================================================================
> --- trunk/boost/fusion/container/list/detail/build_cons.hpp (original)
> +++ trunk/boost/fusion/container/list/detail/build_cons.hpp 2011-01-06 20:17:40 EST (Thu, 06 Jan 2011)
> @@ -48,7 +48,8 @@
> static type
> call(First const& f, Last const& l)
> {
> - return type(*f, next_build_cons::call(fusion::next(f), l));
> + typename result_of::value_of<First>::type v = *f;
> + return type(v, next_build_cons::call(fusion::next(f), l));
> }
> };

result_of::deref would be better. There's no reason to
make an extra copy. (Although this code looks pretty
copy-happy to begin with).

In Christ,
Steven Watanabe


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