More general fix for vc8.0

[SVN r24765]
This commit is contained in:
Pavol Droba
2004-08-26 16:03:48 +00:00
parent 6fb58192d7
commit fa09dddc75
2 changed files with 10 additions and 11 deletions

View File

@ -125,16 +125,8 @@ namespace boost {
ForwardIteratorT SegmentEnd )
{
if(InsertIt!=SegmentBegin)
{
// Call replace to do the job
replace( Input, InsertIt, SegmentBegin, Storage );
}
else
{
// Call insert to do the job
insert( Input, InsertIt, Storage );
}
// Call replace to do the job
replace( Input, InsertIt, SegmentBegin, Storage );
// Empty the storage
Storage.clear();
// Iterators were not changed, simply return the end of segment

View File

@ -172,7 +172,14 @@ namespace boost {
BOOST_STRING_TYPENAME InputT::iterator To,
const InsertT& Insert )
{
replace( Input, From, To, begin(Insert), end(Insert) );
if(From!=To)
{
replace( Input, From, To, begin(Insert), end(Insert) );
}
else
{
insert( Input, From, begin(Insert), end(Insert) );
}
}
} // namespace detail