forked from boostorg/fusion
merged fusion from the trunk
[SVN r63560]
This commit is contained in:
@ -21,7 +21,6 @@
|
||||
#include <boost/mpl/inherit.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct filter_view_tag;
|
||||
@ -46,8 +45,8 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::end<Sequence>::type last_type;
|
||||
typedef Pred pred_type;
|
||||
|
||||
filter_view(Sequence& seq)
|
||||
: seq(seq)
|
||||
filter_view(Sequence& in_seq)
|
||||
: seq(in_seq)
|
||||
{}
|
||||
|
||||
first_type first() const { return fusion::begin(seq); }
|
||||
|
@ -54,10 +54,14 @@ namespace boost { namespace fusion
|
||||
typedef last_iter last_type;
|
||||
typedef Pred pred_type;
|
||||
|
||||
filter_iterator(First const& first)
|
||||
: first(filter::call(first_converter::call(first))) {}
|
||||
filter_iterator(First const& in_first)
|
||||
: first(filter::call(first_converter::call(in_first))) {}
|
||||
|
||||
first_type first;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
filter_iterator& operator= (filter_iterator const&);
|
||||
};
|
||||
}}
|
||||
|
||||
|
@ -17,6 +17,12 @@
|
||||
#include <boost/fusion/view/iterator_range/detail/at_impl.hpp>
|
||||
#include <boost/fusion/view/iterator_range/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning (disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
@ -35,15 +41,19 @@ namespace boost { namespace fusion
|
||||
|
||||
typedef typename traits::category_of<begin_type>::type category;
|
||||
|
||||
iterator_range(First const& first, Last const& last)
|
||||
: first(convert_iterator<First>::call(first))
|
||||
, last(convert_iterator<Last>::call(last)) {}
|
||||
iterator_range(First const& in_first, Last const& in_last)
|
||||
: first(convert_iterator<First>::call(in_first))
|
||||
, last(convert_iterator<Last>::call(in_last)) {}
|
||||
|
||||
begin_type first;
|
||||
end_type last;
|
||||
};
|
||||
}}
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -52,9 +52,9 @@ namespace boost { namespace fusion
|
||||
typedef typename result_of::end<Sequence2>::type concat_last_type;
|
||||
typedef typename mpl::plus<result_of::size<Sequence1>, result_of::size<Sequence2> >::type size;
|
||||
|
||||
joint_view(Sequence1& seq1, Sequence2& seq2)
|
||||
: seq1(seq1)
|
||||
, seq2(seq2)
|
||||
joint_view(Sequence1& in_seq1, Sequence2& in_seq2)
|
||||
: seq1(in_seq1)
|
||||
, seq2(in_seq2)
|
||||
{}
|
||||
|
||||
first_type first() const { return fusion::begin(seq1); }
|
||||
@ -62,6 +62,8 @@ namespace boost { namespace fusion
|
||||
concat_last_type concat_last() const { return fusion::end(seq2); }
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
joint_view& operator= (joint_view const&);
|
||||
|
||||
typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
|
||||
typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
|
||||
|
@ -40,13 +40,17 @@ namespace boost { namespace fusion
|
||||
typedef Category category;
|
||||
BOOST_STATIC_ASSERT((!result_of::equal_to<first_type, last_type>::value));
|
||||
|
||||
joint_view_iterator(First const& first, Concat const& concat)
|
||||
: first(first_converter::call(first))
|
||||
, concat(concat_converter::call(concat))
|
||||
joint_view_iterator(First const& in_first, Concat const& in_concat)
|
||||
: first(first_converter::call(in_first))
|
||||
, concat(concat_converter::call(in_concat))
|
||||
{}
|
||||
|
||||
first_type first;
|
||||
concat_type concat;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
joint_view_iterator& operator= (joint_view_iterator const&);
|
||||
};
|
||||
}}
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace boost { namespace fusion
|
||||
>::type type;
|
||||
|
||||
static type
|
||||
call(First const& first, Last const& last)
|
||||
call(First const& /*first*/, Last const& /*last*/)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ namespace boost { namespace fusion
|
||||
typedef Sequence sequence_type;
|
||||
typedef mpl_iterator<Pos> first_type;
|
||||
|
||||
explicit nview_iterator(Sequence& seq)
|
||||
: seq(seq) {}
|
||||
explicit nview_iterator(Sequence& in_seq)
|
||||
: seq(in_seq) {}
|
||||
|
||||
Sequence& seq;
|
||||
|
||||
|
@ -37,10 +37,14 @@ namespace boost { namespace fusion
|
||||
mpl::if_<traits::is_view<Sequence>, Sequence, sequence_type&>::type
|
||||
stored_seq_type;
|
||||
|
||||
repetitive_view(Sequence& seq)
|
||||
: seq(seq) {}
|
||||
repetitive_view(Sequence& in_seq)
|
||||
: seq(in_seq) {}
|
||||
|
||||
stored_seq_type seq;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
repetitive_view& operator= (repetitive_view const&);
|
||||
};
|
||||
|
||||
}}
|
||||
|
@ -35,15 +35,19 @@ namespace boost { namespace fusion
|
||||
typedef typename convert_iterator<typename result_of::end<Sequence>::type>::type end_type;
|
||||
typedef single_pass_traversal_tag category;
|
||||
|
||||
explicit repetitive_view_iterator(Sequence& seq)
|
||||
: seq(seq), pos(begin(seq)) {}
|
||||
explicit repetitive_view_iterator(Sequence& in_seq)
|
||||
: seq(in_seq), pos(begin(in_seq)) {}
|
||||
|
||||
repetitive_view_iterator(Sequence& seq, pos_type const& pos)
|
||||
: seq(seq), pos(pos) {}
|
||||
repetitive_view_iterator(Sequence& in_seq, pos_type const& in_pos)
|
||||
: seq(in_seq), pos(in_pos) {}
|
||||
|
||||
Sequence& seq;
|
||||
pos_type pos;
|
||||
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
repetitive_view_iterator& operator= (repetitive_view_iterator const&);
|
||||
};
|
||||
}}
|
||||
|
||||
|
@ -49,13 +49,17 @@ namespace boost { namespace fusion
|
||||
bidirectional_traversal_tag
|
||||
, typename traits::category_of<first_type>::type>::value));
|
||||
|
||||
reverse_view(Sequence& seq)
|
||||
: seq(seq)
|
||||
reverse_view(Sequence& in_seq)
|
||||
: seq(in_seq)
|
||||
{}
|
||||
|
||||
first_type first() const { return fusion::begin(seq); }
|
||||
last_type last() const { return fusion::end(seq); }
|
||||
typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
reverse_view& operator= (reverse_view const&);
|
||||
};
|
||||
}}
|
||||
|
||||
|
@ -41,10 +41,14 @@ namespace boost { namespace fusion
|
||||
bidirectional_traversal_tag
|
||||
, category>::value));
|
||||
|
||||
reverse_view_iterator(First const& first)
|
||||
: first(converter::call(first)) {}
|
||||
reverse_view_iterator(First const& in_first)
|
||||
: first(converter::call(in_first)) {}
|
||||
|
||||
first_type first;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
reverse_view_iterator& operator= (reverse_view_iterator const&);
|
||||
};
|
||||
}}
|
||||
|
||||
|
@ -15,6 +15,12 @@
|
||||
#include <boost/fusion/view/single_view/detail/end_impl.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning (disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
@ -35,8 +41,8 @@ namespace boost { namespace fusion
|
||||
single_view()
|
||||
: val() {}
|
||||
|
||||
explicit single_view(typename detail::call_param<T>::type val)
|
||||
: val(val) {}
|
||||
explicit single_view(typename detail::call_param<T>::type in_val)
|
||||
: val(in_val) {}
|
||||
|
||||
value_type val;
|
||||
};
|
||||
@ -49,6 +55,10 @@ namespace boost { namespace fusion
|
||||
}
|
||||
}}
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -12,6 +12,12 @@
|
||||
#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/next_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning (disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
@ -42,6 +48,10 @@ namespace boost { namespace fusion
|
||||
};
|
||||
}}
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -55,10 +55,10 @@ namespace boost { namespace fusion
|
||||
typedef Sequence2 sequence2_type;
|
||||
typedef F transform_type;
|
||||
|
||||
transform_view(Sequence1& seq1, Sequence2& seq2, F const& binop)
|
||||
transform_view(Sequence1& in_seq1, Sequence2& in_seq2, F const& binop)
|
||||
: f(binop)
|
||||
, seq1(seq1)
|
||||
, seq2(seq2)
|
||||
, seq1(in_seq1)
|
||||
, seq2(in_seq2)
|
||||
{}
|
||||
|
||||
first1_type first1() const { return fusion::begin(seq1); }
|
||||
@ -69,6 +69,10 @@ namespace boost { namespace fusion
|
||||
transform_type f;
|
||||
typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
|
||||
typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
transform_view& operator= (transform_view const&);
|
||||
};
|
||||
|
||||
// Unary Version
|
||||
@ -90,9 +94,9 @@ namespace boost { namespace fusion
|
||||
typedef Sequence sequence_type;
|
||||
typedef F transform_type;
|
||||
|
||||
transform_view(Sequence& seq, F const& f)
|
||||
: seq(seq)
|
||||
, f(f)
|
||||
transform_view(Sequence& in_seq, F const& in_f)
|
||||
: seq(in_seq)
|
||||
, f(in_f)
|
||||
{}
|
||||
|
||||
first_type first() const { return fusion::begin(seq); }
|
||||
|
@ -34,8 +34,8 @@ namespace boost { namespace fusion
|
||||
typedef typename traits::category_of<first_type>::type category;
|
||||
typedef F transform_type;
|
||||
|
||||
transform_view_iterator(First const& first, F const& f)
|
||||
: first(converter::call(first)), f(f) {}
|
||||
transform_view_iterator(First const& in_first, F const& in_f)
|
||||
: first(converter::call(in_first)), f(in_f) {}
|
||||
|
||||
first_type first;
|
||||
transform_type f;
|
||||
@ -60,8 +60,8 @@ namespace boost { namespace fusion
|
||||
typedef typename traits::category_of<first1_type>::type category;
|
||||
typedef F transform_type;
|
||||
|
||||
transform_view_iterator2(First1 const& first1, First2 const& first2, F const& f)
|
||||
: first1(converter1::call(first1)), first2(converter2::call(first2)), f(f) {}
|
||||
transform_view_iterator2(First1 const& in_first1, First2 const& in_first2, F const& in_f)
|
||||
: first1(converter1::call(in_first1)), first2(converter2::call(in_first2)), f(in_f) {}
|
||||
|
||||
first1_type first1;
|
||||
first2_type first2;
|
||||
|
@ -70,7 +70,7 @@ namespace boost { namespace fusion {
|
||||
: detail::zip_view_iterator_distance<It1, It2>::type
|
||||
{
|
||||
static typename detail::zip_view_iterator_distance<It1, It2>::type
|
||||
call(It1 const& it1, It2 const& it2)
|
||||
call(It1 const& /*it1*/, It2 const& /*it2*/)
|
||||
{
|
||||
return typename detail::zip_view_iterator_distance<It1, It2>::type();
|
||||
}
|
||||
|
Reference in New Issue
Block a user