From 108365abe709a44a67dd9b866dabe501cd9d1604 Mon Sep 17 00:00:00 2001 From: Pavol Droba Date: Tue, 31 Aug 2004 07:43:02 +0000 Subject: [PATCH] Attempt to fix "Empty sequence after erase problem" reported by vc8.0 [SVN r24835] --- include/boost/algorithm/string/detail/sequence.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/algorithm/string/detail/sequence.hpp b/include/boost/algorithm/string/detail/sequence.hpp index 76416b1..edd5687 100644 --- a/include/boost/algorithm/string/detail/sequence.hpp +++ b/include/boost/algorithm/string/detail/sequence.hpp @@ -110,7 +110,14 @@ namespace boost { BOOST_STRING_TYPENAME InputT::iterator At=Input.erase( From, To ); if ( Begin!=End ) { - Input.insert( At, Begin, End ); + if(!Input.empty()) + { + Input.insert( At, Begin, End ); + } + else + { + Input.insert( Input.begin(), Begin, End ); + } } } };