mirror of
https://github.com/boostorg/utility.git
synced 2025-07-31 13:27:34 +02:00
updated for changes in named params
[SVN r10457]
This commit is contained in:
@ -4,6 +4,8 @@
|
|||||||
// "as is" without express or implied warranty, and with no claim as
|
// "as is" without express or implied warranty, and with no claim as
|
||||||
// to its suitability for any purpose.
|
// to its suitability for any purpose.
|
||||||
|
|
||||||
|
// 27 June 2001 Jeremy Siek
|
||||||
|
// Upated for change in named params.
|
||||||
// 8 Mar 2001 Jeremy Siek
|
// 8 Mar 2001 Jeremy Siek
|
||||||
// Initial checkin.
|
// Initial checkin.
|
||||||
|
|
||||||
@ -26,9 +28,8 @@ main()
|
|||||||
|
|
||||||
{
|
{
|
||||||
typedef boost::iterator_adaptor<my_iter, boost::default_iterator_policies,
|
typedef boost::iterator_adaptor<my_iter, boost::default_iterator_policies,
|
||||||
boost::iterator_traits_generator
|
boost::reference_is<dummyT>,
|
||||||
::reference<dummyT>
|
boost::iterator_category_is<std::input_iterator_tag> > iter_type;
|
||||||
::iterator_category<std::input_iterator_tag> > iter_type;
|
|
||||||
|
|
||||||
BOOST_STATIC_ASSERT((boost::is_same<iter_type::iterator_category*,
|
BOOST_STATIC_ASSERT((boost::is_same<iter_type::iterator_category*,
|
||||||
std::input_iterator_tag*>::value));
|
std::input_iterator_tag*>::value));
|
||||||
@ -42,12 +43,11 @@ main()
|
|||||||
{
|
{
|
||||||
typedef boost::iterator_adaptor<dummyT*,
|
typedef boost::iterator_adaptor<dummyT*,
|
||||||
boost::default_iterator_policies,
|
boost::default_iterator_policies,
|
||||||
boost::iterator_traits_generator
|
boost::value_type_is<dummyT>,
|
||||||
::value_type<dummyT>
|
boost::reference_is<const dummyT&>,
|
||||||
::reference<const dummyT&>
|
boost::pointer_is<const dummyT*>,
|
||||||
::pointer<const dummyT*>
|
boost::iterator_category_is<std::forward_iterator_tag>,
|
||||||
::iterator_category<std::forward_iterator_tag>
|
boost::difference_type_is<std::ptrdiff_t> > adaptor_type;
|
||||||
::difference_type<std::ptrdiff_t> > adaptor_type;
|
|
||||||
|
|
||||||
adaptor_type i(array);
|
adaptor_type i(array);
|
||||||
|
|
@ -21,9 +21,8 @@ main(int, char*[])
|
|||||||
int x[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
|
int x[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
|
||||||
|
|
||||||
typedef std::binder1st< std::multiplies<int> > Function;
|
typedef std::binder1st< std::multiplies<int> > Function;
|
||||||
typedef boost::transform_iterator<Function, int*,
|
typedef boost::transform_iterator_generator<Function, int*
|
||||||
boost::iterator<std::random_access_iterator_tag, int>
|
>::type doubling_iterator;
|
||||||
>::type doubling_iterator;
|
|
||||||
|
|
||||||
doubling_iterator i(x, std::bind1st(std::multiplies<int>(), 2)),
|
doubling_iterator i(x, std::bind1st(std::multiplies<int>(), 2)),
|
||||||
i_end(x + sizeof(x)/sizeof(int), std::bind1st(std::multiplies<int>(), 2));
|
i_end(x + sizeof(x)/sizeof(int), std::bind1st(std::multiplies<int>(), 2));
|
||||||
|
Reference in New Issue
Block a user