Hello.
I just stumped on the following gcc bug - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15992 (std::locale is not working for non-C locales).

It seems to affect all non-glibc platforms (reproducible on FreeBSD and illumos). Tried the same test with clang - no difference (as affected code is in libstdc++). Simple test case:

$ cat t.cpp
#include <locale>

int main (int argc, char *argv[])
{
    for (int i = 1; i < argc; ++i) {
        try {
            const std::locale loc (argv [i]);
        }
        catch (std::exception &e) {
            printf ("exception: %s: %s\n", argv [i], e.what ());
        }
    }
}

$ g++ -o locale t.cpp   # or clang++ -o locale t.cpp , doesn't matter
 ./locale en_US.UTF-8
exception: en_US.UTF-8: locale::facet::_S_create_c_locale name not valid

--
Best regards,
Alexander Pyhalov,
system administrator of Computer Center of Southern Federal University
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to