summaryrefslogtreecommitdiff
path: root/boost/archive/iterators/istream_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/archive/iterators/istream_iterator.hpp')
-rw-r--r--boost/archive/iterators/istream_iterator.hpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/boost/archive/iterators/istream_iterator.hpp b/boost/archive/iterators/istream_iterator.hpp
index 1df612dc8d..41aa0be37b 100644
--- a/boost/archive/iterators/istream_iterator.hpp
+++ b/boost/archive/iterators/istream_iterator.hpp
@@ -2,7 +2,7 @@
#define BOOST_ARCHIVE_ITERATORS_ISTREAM_ITERATOR_HPP
// MS compatible compilers support #pragma once
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -41,24 +41,25 @@ class istream_iterator :
{
friend class boost::iterator_core_access;
typedef istream_iterator this_t ;
- typedef BOOST_DEDUCED_TYPENAME boost::iterator_facade<
+ typedef typename boost::iterator_facade<
istream_iterator<Elem>,
Elem,
std::input_iterator_tag,
Elem
> super_t;
- typedef BOOST_DEDUCED_TYPENAME std::basic_istream<Elem> istream_type;
+ typedef typename std::basic_istream<Elem> istream_type;
- //Access the value referred to
- Elem dereference() const {
- return m_current_value;
- }
-
bool equal(const this_t & rhs) const {
// note: only works for comparison against end of stream
return m_istream == rhs.m_istream;
}
+/*
+ //Access the value referred to
+ Elem dereference() const {
+ return m_current_value;
+ }
+
void increment(){
if(NULL != m_istream){
m_current_value = static_cast<Elem>(m_istream->get());
@@ -67,6 +68,17 @@ class istream_iterator :
}
}
}
+*/
+ //Access the value referred to
+ Elem dereference() const {
+ return m_istream->peek();
+ }
+
+ void increment(){
+ if(NULL != m_istream){
+ m_istream->ignore(1);
+ }
+ }
istream_type *m_istream;
Elem m_current_value;
@@ -74,7 +86,7 @@ public:
istream_iterator(istream_type & is) :
m_istream(& is)
{
- increment();
+ //increment();
}
istream_iterator() :