Add iterator_facade.hpp to std.

This commit is contained in:
vng 2011-11-16 06:37:24 +03:00 committed by Alex Zolotarev
parent 201ec0a2ba
commit ad7b270a85
2 changed files with 19 additions and 5 deletions

View file

@ -1,11 +1,13 @@
#pragma once
#include "reader.hpp"
#include "varint.hpp"
#include "../base/assert.hpp"
#include "../base/base.hpp"
#include "../base/src_point.hpp"
#include "../std/type_traits.hpp"
#include <boost/iterator/iterator_facade.hpp>
#include "../std/iterator_facade.hpp"
template <
@ -40,12 +42,10 @@ public:
return result;
}
class const_iterator : public boost::iterator_facade<
class const_iterator : public iterator_facade<
const_iterator,
value_type const,
boost::random_access_traversal_tag,
value_type const &,
difference_type>
random_access_traversal_tag>
{
public:
const_iterator() : m_pReader(NULL), m_I(0), m_bValueRead(false)

14
std/iterator_facade.hpp Normal file
View file

@ -0,0 +1,14 @@
#pragma once
#include "common_defines.hpp"
#ifdef new
#undef new
#endif
#include <boost/iterator/iterator_facade.hpp>
using boost::iterator_facade;
using boost::random_access_traversal_tag;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif