Abdelrazak Younes wrote:
Georg Baum wrote:
Am Sonntag, 3. September 2006 14:48 schrieb Abdelrazak Younes:
Georg,

Your template solution for subst() doesn't please MSVC:

I almost expected that ;-) Does this patch work? If yes please commit it.

Yes, it compiles. I will commit it with two more methods if that is fine with you:

char_type lowercase(char_type c)
{
    if (c >= 256)
        return c;
return tolower(static_cast<char>(c));

Question first: std::tolower() is a template and compiles fine with char_type. The cast is not useful here as the test above ensure that the argument is 8-bit ascii. Question is: is the test really necessary? Should we trust std::lower() to do the right thing with unicode char?

Abdel.

Reply via email to