forked from boostorg/fusion
Fusion: resolved const correctness issue
[SVN r56381]
This commit is contained in:
@ -29,15 +29,14 @@ namespace boost { namespace fusion
|
|||||||
template<typename Sequence>
|
template<typename Sequence>
|
||||||
struct apply
|
struct apply
|
||||||
{
|
{
|
||||||
typedef typename Sequence::sequence_type sequence_type;
|
|
||||||
typedef typename Sequence::index_type index_type;
|
typedef typename Sequence::index_type index_type;
|
||||||
|
|
||||||
typedef nview_iterator<sequence_type,
|
typedef nview_iterator<Sequence,
|
||||||
typename mpl::begin<index_type>::type> type;
|
typename mpl::begin<index_type>::type> type;
|
||||||
|
|
||||||
static type call(Sequence& v)
|
static type call(Sequence& s)
|
||||||
{
|
{
|
||||||
return type(v.seq);
|
return type(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -30,11 +30,12 @@ namespace boost { namespace fusion
|
|||||||
typedef typename Iterator::sequence_type sequence_type;
|
typedef typename Iterator::sequence_type sequence_type;
|
||||||
|
|
||||||
typedef typename result_of::deref<first_type>::type index;
|
typedef typename result_of::deref<first_type>::type index;
|
||||||
typedef typename result_of::at<sequence_type, index>::type type;
|
typedef typename result_of::at<
|
||||||
|
typename sequence_type::sequence_type, index>::type type;
|
||||||
|
|
||||||
static type call(Iterator const& i)
|
static type call(Iterator const& i)
|
||||||
{
|
{
|
||||||
return at<index>(i.seq);
|
return at<index>(i.seq.seq);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -30,15 +30,14 @@ namespace boost { namespace fusion
|
|||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
struct apply
|
struct apply
|
||||||
{
|
{
|
||||||
typedef typename Sequence::sequence_type sequence_type;
|
|
||||||
typedef typename Sequence::index_type index_type;
|
typedef typename Sequence::index_type index_type;
|
||||||
|
|
||||||
typedef nview_iterator<sequence_type,
|
typedef nview_iterator<Sequence,
|
||||||
typename mpl::end<index_type>::type> type;
|
typename mpl::end<index_type>::type> type;
|
||||||
|
|
||||||
static type call(Sequence& v)
|
static type call(Sequence& s)
|
||||||
{
|
{
|
||||||
return type(v.seq);
|
return type(s);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM)
|
#if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM)
|
||||||
#define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM
|
#define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM
|
||||||
|
|
||||||
|
#include <climits>
|
||||||
#include <boost/preprocessor/cat.hpp>
|
#include <boost/preprocessor/cat.hpp>
|
||||||
#include <boost/preprocessor/repeat.hpp>
|
#include <boost/preprocessor/repeat.hpp>
|
||||||
#include <boost/preprocessor/iterate.hpp>
|
#include <boost/preprocessor/iterate.hpp>
|
||||||
@ -28,7 +29,7 @@
|
|||||||
namespace boost { namespace fusion { namespace result_of
|
namespace boost { namespace fusion { namespace result_of
|
||||||
{
|
{
|
||||||
template <typename Sequence
|
template <typename Sequence
|
||||||
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, -1)>
|
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)>
|
||||||
struct as_nview
|
struct as_nview
|
||||||
{
|
{
|
||||||
typedef mpl::vector_c<
|
typedef mpl::vector_c<
|
||||||
|
@ -33,7 +33,8 @@ namespace boost { namespace fusion
|
|||||||
typedef typename Iterator::sequence_type sequence_type;
|
typedef typename Iterator::sequence_type sequence_type;
|
||||||
|
|
||||||
typedef typename result_of::deref<first_type>::type index;
|
typedef typename result_of::deref<first_type>::type index;
|
||||||
typedef typename result_of::at<sequence_type, index>::type type;
|
typedef typename result_of::at<
|
||||||
|
typename sequence_type::sequence_type, index>::type type;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user