Re: [boost] [Boost-commit] svn:boost r67745 - trunk/boost/fusion/container/list/detail

AMDG On 1/6/2011 5:17 PM, marshall@idio.com 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
participants (1)
-
Steven Watanabe