forked from boostorg/utility
Compare commits
4 Commits
esp-idf-co
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
666f5473d5 | |||
9a69a25fe8 | |||
9c3e87fe21 | |||
a9ae944ae4 |
@ -4,6 +4,8 @@
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
|
||||
// 27 June 2001 Jeremy Siek
|
||||
// Upated for change in named params.
|
||||
// 8 Mar 2001 Jeremy Siek
|
||||
// Initial checkin.
|
||||
|
||||
@ -11,9 +13,6 @@
|
||||
#include <boost/pending/iterator_tests.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
class bar { };
|
||||
void foo(bar) { }
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
@ -26,9 +25,8 @@ main()
|
||||
|
||||
{
|
||||
typedef boost::iterator_adaptor<my_iter, boost::default_iterator_policies,
|
||||
boost::iterator_traits_generator
|
||||
::reference<dummyT>
|
||||
::iterator_category<std::input_iterator_tag> > iter_type;
|
||||
boost::reference_is<dummyT>,
|
||||
boost::iterator_category_is<std::input_iterator_tag> > iter_type;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<iter_type::iterator_category*,
|
||||
std::input_iterator_tag*>::value));
|
||||
@ -42,12 +40,11 @@ main()
|
||||
{
|
||||
typedef boost::iterator_adaptor<dummyT*,
|
||||
boost::default_iterator_policies,
|
||||
boost::iterator_traits_generator
|
||||
::value_type<dummyT>
|
||||
::reference<const dummyT&>
|
||||
::pointer<const dummyT*>
|
||||
::iterator_category<std::forward_iterator_tag>
|
||||
::difference_type<std::ptrdiff_t> > adaptor_type;
|
||||
boost::value_type_is<dummyT>,
|
||||
boost::reference_is<const dummyT&>,
|
||||
boost::pointer_is<const dummyT*>,
|
||||
boost::iterator_category_is<std::forward_iterator_tag>,
|
||||
boost::difference_type_is<std::ptrdiff_t> > adaptor_type;
|
||||
|
||||
adaptor_type i(array);
|
||||
|
@ -21,9 +21,8 @@ main(int, char*[])
|
||||
int x[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
|
||||
|
||||
typedef std::binder1st< std::multiplies<int> > Function;
|
||||
typedef boost::transform_iterator<Function, int*,
|
||||
boost::iterator<std::random_access_iterator_tag, int>
|
||||
>::type doubling_iterator;
|
||||
typedef boost::transform_iterator_generator<Function, int*
|
||||
>::type doubling_iterator;
|
||||
|
||||
doubling_iterator i(x, std::bind1st(std::multiplies<int>(), 2)),
|
||||
i_end(x + sizeof(x)/sizeof(int), std::bind1st(std::multiplies<int>(), 2));
|
||||
|
@ -9,6 +9,7 @@
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 27 June 01 Updated to changes in named parameters.
|
||||
// 08 Mar 01 Moved indirect and transform tests to separate files.
|
||||
// (Jeremy Siek)
|
||||
// 19 Feb 01 Take adavantage of improved iterator_traits to do more tests
|
||||
@ -52,8 +53,7 @@
|
||||
#include <boost/pending/iterator_tests.hpp>
|
||||
#include <boost/pending/integer_range.hpp>
|
||||
#include <boost/concept_archetype.hpp>
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
#include <deque>
|
||||
#include <set>
|
||||
|
||||
@ -97,6 +97,9 @@ typedef std::deque<int> storage;
|
||||
typedef std::deque<int*> pointer_deque;
|
||||
typedef std::set<storage::iterator> iterator_set;
|
||||
|
||||
struct bar { };
|
||||
void foo(bar) { }
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
@ -306,12 +309,11 @@ main()
|
||||
#else
|
||||
typedef boost::iterator_adaptor<boost::forward_iterator_archetype<dummyT>,
|
||||
boost::default_iterator_policies,
|
||||
boost::iterator_traits_generator
|
||||
::value_type<dummyT>
|
||||
::reference<const dummyT&>
|
||||
::pointer<const dummyT*>
|
||||
::iterator_category<std::forward_iterator_tag>
|
||||
::difference_type<std::ptrdiff_t> > adaptor_type;
|
||||
boost::value_type_is<dummyT>,
|
||||
boost::reference_is<const dummyT&>,
|
||||
boost::pointer_is<const dummyT*>,
|
||||
boost::iterator_category_is<std::forward_iterator_tag>,
|
||||
boost::difference_type_is<std::ptrdiff_t> > adaptor_type;
|
||||
#endif
|
||||
adaptor_type i(forward_iter);
|
||||
int zero = 0;
|
||||
|
Reference in New Issue
Block a user