From f16de45e4645f4a542f8d644197270bf12b497fb Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 20 Jul 2004 13:42:31 +0000 Subject: [PATCH] Don't copy default-initialized iterator, which might be singlular. [SVN r23843] --- include/boost/algorithm/string/iterator_range.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/algorithm/string/iterator_range.hpp b/include/boost/algorithm/string/iterator_range.hpp index aef17e4..e3d42d6 100644 --- a/include/boost/algorithm/string/iterator_range.hpp +++ b/include/boost/algorithm/string/iterator_range.hpp @@ -72,9 +72,13 @@ namespace boost { typedef IteratorT const_iterator; //! iterator type typedef IteratorT iterator; - + + //! Empty constructor + iterator_range() : + m_Begin(), m_End() {} + //! Constructor from a pair of iterators - iterator_range( iterator Begin=iterator(), iterator End=iterator() ) : + iterator_range( iterator Begin, iterator End ) : m_Begin(Begin), m_End(End) {} //! Constructor from a std::pair