On 04/17/2012 12:57 PM, bearophile wrote:

>> The algorithm
>> above is not exception-safe because stride() may throw. But this way off
>> topic on this thread. :)
>

> You can't expect Phobos to be perfect, it needs to be improved
> iteratively. If you think that's not exception safe and and there are simple > means to do it, then please add this in Bugzilla. Being formally aware of a
> problem is the second step toward improving the situation.

Agreed.

But I am not that sure about this particular function anymore because for the function to be not 'strongly exception safe', the input string must be invalid UTF-8 to begin with.

I am not sure how bad it is to not preserve the actual invalidness of the string in that case. :)

Ali

Reply via email to