mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-29 12:07:36 +02:00
fixed g++ complaining "error: shadows template parm"
[SVN r35346]
This commit is contained in:
@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
template <typename Iterator>
|
template <typename Iterator_>
|
||||||
struct mpl_iterator
|
struct mpl_iterator
|
||||||
: iterator_facade<
|
: iterator_facade<
|
||||||
mpl_iterator<Iterator>
|
mpl_iterator<Iterator_>
|
||||||
, typename detail::mpl_iterator_category<typename Iterator::category>::type
|
, typename detail::mpl_iterator_category<typename Iterator_::category>::type
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef typename remove_const<Iterator>::type iterator_type;
|
typedef typename remove_const<Iterator_>::type iterator_type;
|
||||||
|
|
||||||
template <typename Iterator>
|
template <typename Iterator>
|
||||||
struct value_of : mpl::deref<typename Iterator::iterator_type> {};
|
struct value_of : mpl::deref<typename Iterator::iterator_type> {};
|
||||||
|
@ -21,65 +21,65 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
struct random_access_traversal_tag;
|
struct random_access_traversal_tag;
|
||||||
|
|
||||||
template <typename Pair, int N>
|
template <typename Pair_, int N>
|
||||||
struct std_pair_iterator
|
struct std_pair_iterator
|
||||||
: iterator_facade<std_pair_iterator<Pair, N>, random_access_traversal_tag>
|
: iterator_facade<std_pair_iterator<Pair_, N>, random_access_traversal_tag>
|
||||||
{
|
{
|
||||||
BOOST_MPL_ASSERT_RELATION(N, >=, 0);
|
BOOST_MPL_ASSERT_RELATION(N, >=, 0);
|
||||||
BOOST_MPL_ASSERT_RELATION(N, <=, 2);
|
BOOST_MPL_ASSERT_RELATION(N, <=, 2);
|
||||||
|
|
||||||
typedef mpl::int_<N> index;
|
typedef mpl::int_<N> index;
|
||||||
typedef Pair pair_type;
|
typedef Pair_ pair_type;
|
||||||
|
|
||||||
std_pair_iterator(Pair& pair)
|
std_pair_iterator(Pair_& pair)
|
||||||
: pair(pair) {}
|
: pair(pair) {}
|
||||||
Pair& pair;
|
Pair_& pair;
|
||||||
|
|
||||||
template <typename Iterator>
|
template <typename Iterator>
|
||||||
struct value_of;
|
struct value_of;
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct value_of<std_pair_iterator<Pair_, 0> >
|
struct value_of<std_pair_iterator<Pair, 0> >
|
||||||
: mpl::identity<typename Pair_::first_type> {};
|
: mpl::identity<typename Pair::first_type> {};
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct value_of<std_pair_iterator<Pair_, 1> >
|
struct value_of<std_pair_iterator<Pair, 1> >
|
||||||
: mpl::identity<typename Pair_::second_type> {};
|
: mpl::identity<typename Pair::second_type> {};
|
||||||
|
|
||||||
template <typename Iterator>
|
template <typename Iterator>
|
||||||
struct deref;
|
struct deref;
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct deref<std_pair_iterator<Pair_, 0> >
|
struct deref<std_pair_iterator<Pair, 0> >
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
mpl::if_<
|
mpl::if_<
|
||||||
is_const<Pair_>
|
is_const<Pair>
|
||||||
, typename Pair_::first_type const&
|
, typename Pair::first_type const&
|
||||||
, typename Pair_::first_type&
|
, typename Pair::first_type&
|
||||||
>::type
|
>::type
|
||||||
type;
|
type;
|
||||||
|
|
||||||
static type
|
static type
|
||||||
call(std_pair_iterator<Pair_, 0> const& iter)
|
call(std_pair_iterator<Pair, 0> const& iter)
|
||||||
{
|
{
|
||||||
return iter.pair.first;
|
return iter.pair.first;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct deref<std_pair_iterator<Pair_, 1> >
|
struct deref<std_pair_iterator<Pair, 1> >
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
mpl::if_<
|
mpl::if_<
|
||||||
is_const<Pair_>
|
is_const<Pair>
|
||||||
, typename Pair_::second_type const&
|
, typename Pair::second_type const&
|
||||||
, typename Pair_::second_type&
|
, typename Pair::second_type&
|
||||||
>::type
|
>::type
|
||||||
type;
|
type;
|
||||||
|
|
||||||
static type
|
static type
|
||||||
call(std_pair_iterator<Pair_, 1> const& iter)
|
call(std_pair_iterator<Pair, 1> const& iter)
|
||||||
{
|
{
|
||||||
return iter.pair.second;
|
return iter.pair.second;
|
||||||
}
|
}
|
||||||
|
@ -21,65 +21,65 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
struct random_access_traversal_tag;
|
struct random_access_traversal_tag;
|
||||||
|
|
||||||
template <typename Pair, int N>
|
template <typename Pair_, int N>
|
||||||
struct std_pair_iterator
|
struct std_pair_iterator
|
||||||
: iterator_facade<std_pair_iterator<Pair, N>, random_access_traversal_tag>
|
: iterator_facade<std_pair_iterator<Pair_, N>, random_access_traversal_tag>
|
||||||
{
|
{
|
||||||
BOOST_MPL_ASSERT_RELATION(N, >=, 0);
|
BOOST_MPL_ASSERT_RELATION(N, >=, 0);
|
||||||
BOOST_MPL_ASSERT_RELATION(N, <=, 2);
|
BOOST_MPL_ASSERT_RELATION(N, <=, 2);
|
||||||
|
|
||||||
typedef mpl::int_<N> index;
|
typedef mpl::int_<N> index;
|
||||||
typedef Pair pair_type;
|
typedef Pair_ pair_type;
|
||||||
|
|
||||||
std_pair_iterator(Pair& pair)
|
std_pair_iterator(Pair_& pair)
|
||||||
: pair(pair) {}
|
: pair(pair) {}
|
||||||
Pair& pair;
|
Pair_& pair;
|
||||||
|
|
||||||
template <typename Iterator>
|
template <typename Iterator>
|
||||||
struct value_of;
|
struct value_of;
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct value_of<std_pair_iterator<Pair_, 0> >
|
struct value_of<std_pair_iterator<Pair, 0> >
|
||||||
: mpl::identity<typename Pair_::first_type> {};
|
: mpl::identity<typename Pair::first_type> {};
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct value_of<std_pair_iterator<Pair_, 1> >
|
struct value_of<std_pair_iterator<Pair, 1> >
|
||||||
: mpl::identity<typename Pair_::second_type> {};
|
: mpl::identity<typename Pair::second_type> {};
|
||||||
|
|
||||||
template <typename Iterator>
|
template <typename Iterator>
|
||||||
struct deref;
|
struct deref;
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct deref<std_pair_iterator<Pair_, 0> >
|
struct deref<std_pair_iterator<Pair, 0> >
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
mpl::if_<
|
mpl::if_<
|
||||||
is_const<Pair_>
|
is_const<Pair>
|
||||||
, typename Pair_::first_type const&
|
, typename Pair::first_type const&
|
||||||
, typename Pair_::first_type&
|
, typename Pair::first_type&
|
||||||
>::type
|
>::type
|
||||||
type;
|
type;
|
||||||
|
|
||||||
static type
|
static type
|
||||||
call(std_pair_iterator<Pair_, 0> const& iter)
|
call(std_pair_iterator<Pair, 0> const& iter)
|
||||||
{
|
{
|
||||||
return iter.pair.first;
|
return iter.pair.first;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Pair_>
|
template <typename Pair>
|
||||||
struct deref<std_pair_iterator<Pair_, 1> >
|
struct deref<std_pair_iterator<Pair, 1> >
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
mpl::if_<
|
mpl::if_<
|
||||||
is_const<Pair_>
|
is_const<Pair>
|
||||||
, typename Pair_::second_type const&
|
, typename Pair::second_type const&
|
||||||
, typename Pair_::second_type&
|
, typename Pair::second_type&
|
||||||
>::type
|
>::type
|
||||||
type;
|
type;
|
||||||
|
|
||||||
static type
|
static type
|
||||||
call(std_pair_iterator<Pair_, 1> const& iter)
|
call(std_pair_iterator<Pair, 1> const& iter)
|
||||||
{
|
{
|
||||||
return iter.pair.second;
|
return iter.pair.second;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user