-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when declaring std::locale #498
Comments
I have updated the program, removing the SDL functions and library, to make it even more minimal. |
It appears that the program doesn't actually crash, it exits because it's unable to recover from an error. We don't really support locales yet, so we're using the stubs included in libc++. Apparently this is not enough to allow constructing a The stubbed I'm not sure why libc++ does it this way, but until we have better locale support, it's probably best to avoid using |
Thank you very much, everything is clear! As these errors can be hard to debug, would it be worth to put a warning message in the "locale" constructor, so that when someone compiles a program and "locale" is used, a warning message is triggered? I know that it is a bad solution, but leaving as it is can make someone waste a lot of time trying to figure out where is his error... |
This line makes the program crash at the beginning, without running a single line. It doesn't matter if the declaration is done as a local variable or as a global one (it fails on both ways):
std::locale const f_portable_locale("C");
The following gist has a minimal program to reproduce this issue:
https://gist.github.com/hcfcoder/326b826dbd13e64f19110bd9905dfaae
The text was updated successfully, but these errors were encountered: