On Saturday, 8 March 2014 at 01:41:01 UTC, Vladimir Panteleev wrote:
On Saturday, 8 March 2014 at 01:38:39 UTC, Andrei Alexandrescu wrote:
On 3/7/14, 4:39 PM, Vladimir Panteleev wrote:
These should not compile post-change, because the sought element (dchar) is not of the same type as the string. So they will not fail silently.

The compared element need not have the same type (otherwise we'd break some other code).

Do you think such code will appear often in practice? Even if the type is a dchar, in some cases the programmer may not have intended to do decoding (e.g. the "dchar" type was a result of type deduction form .front OSLT).

Sorry, I see now that you were referring to algorithms in general. I think adding a temporary warning for character types only, as with .front, would be appropriate...

Reply via email to