Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6965: Handling of sequence of non const reference
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-06-07 05:38:54
#6965: Handling of sequence of non const reference
--------------------------------------+-------------------------------------
Reporter: jfalcou | Owner: djowel
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: fusion
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Comment (by jfalcou):
I Just attached a test case and the error I get.
Adding:
{{{
template <typename Sequence>
static BOOST_PP_CAT(vector_data, N)
init_from_sequence(Sequence& seq)
{
typedef typename result_of::begin<Sequence>::type I0;
I0 i0 = fusion::begin(seq);
BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i));
}
template <typename Sequence>
BOOST_PP_CAT(vector, N)(
Sequence& seq
#if (N == 1)
, typename boost::disable_if<is_convertible<Sequence, T0> >::type*
/*dummy*/ = 0
#endif
)
: base_type(base_type::init_from_sequence(seq)) {}
}}}
to vector_n.hpp and re-preprocess fix the stuff. I guess other sequences
may have similar mechanism. Not sure about any side effect tough.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6965#comment:2> 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:09 UTC