> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com]
> Sent: Wednesday, February 14, 2007 2:47 AM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: [PATCH] Fix of STDCXX-268, STDCXX-331
>
> So unless someone objects (I assume you're fine with it) I
> propose we ditch the _RWSTD_NO_INLINE_MEMBER_TEMPLATES config
> macro and all the workarounds for it. We should do a clean
> sweep through the library to remove it rather than removing
> it piecemeal.
>
> We can either remove the macro first and then commit a
> cleaner version of your patch w/o or we can do it the other
> way around.
> Do you have a preference? (If the latter we should probably
> open a Jira task as a reminder.)
Commited thus: http://svn.apache.org/viewvc?view=rev&rev=507971
Created JIRA task: http://issues.apache.org/jira/browse/STDCXX-339
> >> Btw., I wonder if we could simplify (optimize) this code so as to
> >> call erase(__start, __it) in the catch block instead of
> looping (the
> >> idea is that the range form of erase() might be more
> efficient than
> >> calling the single form repeatedly):
> >
> > Yes, but to get __start we need use loop or std::advance, because
> > __start = __it - __n.
> >
> > iterator __start = __it;
> > std::advance (__start, -n);
> > erase (__start, __it);
> >
> > Another approach is to remember the iterator after first
> successful
> > insert (__it, *__first) operation.
> >
> > What do you prefer?
>
> Definitely the latter. Looping would be expensive.
Done.
Farid.
|