avoid name clash with Boost.Algorithm by renaming replace_range to replaced_range

[SVN r63936]
This commit is contained in:
Neil Groves
2010-07-12 22:02:46 +00:00
parent 40714ccc7e
commit 334bc28136

View File

@ -47,7 +47,7 @@ namespace boost
}; };
template< class R > template< class R >
class replace_range : class replaced_range :
public boost::iterator_range< public boost::iterator_range<
boost::transform_iterator< boost::transform_iterator<
replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >, replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >,
@ -64,7 +64,7 @@ namespace boost
public: public:
typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type; typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type;
replace_range( R& r, value_type from, value_type to ) replaced_range( R& r, value_type from, value_type to )
: base_t( make_transform_iterator( boost::begin(r), Fn(from, to) ), : base_t( make_transform_iterator( boost::begin(r), Fn(from, to) ),
make_transform_iterator( boost::end(r), Fn(from, to) ) ) make_transform_iterator( boost::end(r), Fn(from, to) ) )
{ } { }
@ -83,23 +83,23 @@ namespace boost
}; };
template< class InputRng > template< class InputRng >
inline replace_range<InputRng> inline replaced_range<InputRng>
operator|( InputRng& r, operator|( InputRng& r,
const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f ) const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
{ {
return replace_range<InputRng>(r, f.val1, f.val2); return replaced_range<InputRng>(r, f.val1, f.val2);
} }
template< class InputRng > template< class InputRng >
inline replace_range<const InputRng> inline replaced_range<const InputRng>
operator|( const InputRng& r, operator|( const InputRng& r,
const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f ) const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
{ {
return replace_range<const InputRng>(r, f.val1, f.val2); return replaced_range<const InputRng>(r, f.val1, f.val2);
} }
} // 'range_detail' } // 'range_detail'
using range_detail::replace_range; using range_detail::replaced_range;
namespace adaptors namespace adaptors
{ {
@ -111,21 +111,21 @@ namespace boost
} }
template<class InputRange> template<class InputRange>
inline replace_range<InputRange> inline replaced_range<InputRange>
replace(InputRange& rng, replace(InputRange& rng,
BOOST_DEDUCED_TYPENAME range_value<InputRange>::type from, BOOST_DEDUCED_TYPENAME range_value<InputRange>::type from,
BOOST_DEDUCED_TYPENAME range_value<InputRange>::type to) BOOST_DEDUCED_TYPENAME range_value<InputRange>::type to)
{ {
return replace_range<InputRange>(rng, from, to); return replaced_range<InputRange>(rng, from, to);
} }
template<class InputRange> template<class InputRange>
inline replace_range<const InputRange> inline replaced_range<const InputRange>
replace(const InputRange& rng, replace(const InputRange& rng,
BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type from, BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type from,
BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type to) BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type to)
{ {
return replace_range<const InputRange>(rng, from ,to); return replaced_range<const InputRange>(rng, from ,to);
} }
} // 'adaptors' } // 'adaptors'