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

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

View File

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