Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2823: [fusion] vector copy constructor copies sequence members in different order on different platforms
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-29 04:12:43
#2823: [fusion] vector copy constructor copies sequence members in different order
on different platforms
---------------------------------+------------------------------------------
Reporter: dkomisar@⦠| Owner: djowel
Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: fusion
Version: Boost 1.38.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------+------------------------------------------
Comment (by grafik):
I've run into this problem recently, and bugged Hartmut about it on IRC.
My solution to the implementation defined behavior that makes all fusion
sequence operations have an unpredictable execution ordering. My solution
was to create my own version of fusion::as_list that has a guaranteed
execution order. The key being to make copies of the sequence values in
the correct ordering. Which boils down to changing
fusion::detail::build_cons<First,Last,false>::call(...) from:
{{{
static type
call(First const& f, Last const& l)
{
return type(*f, next_build_cons::call(fusion::next(f), l));
}
}}}
To:
{{{
static type
call(First const& f, Last const& l)
{
typename result_of::value_of<First>::type v = *f;
return type(v, next_build_cons::call(fusion::next(f), l));
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2823#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC