updated tag mechanism for iterators using Dave's idea

[SVN r612]
This commit is contained in:
Jeremy Siek
2002-10-24 15:45:01 +00:00
parent c4f60fd24b
commit 560c48fe7a
5 changed files with 41 additions and 29 deletions

View File

@@ -7,8 +7,9 @@
int main()
{
int x[] = { 1, 2, 3, 4 };
boost::reverse_iterator<int*, int, int&, int*, std::random_access_iterator_tag, std::ptrdiff_t>
first(x + 4), last(x);
boost::reverse_iterator<int*, int, int&, int*,
boost::iterator_tag<boost::mutable_lvalue_iterator_tag, boost::random_access_traversal_tag>
, std::ptrdiff_t> first(x + 4), last(x);
std::copy(first, last, std::ostream_iterator<int>(std::cout, " "));
std::cout << std::endl;
return 0;