-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
String.h specialize hash<string> causes problems for libc++. #74
Comments
Can you please paste this as text somehow? It seems HTML ate a lot of your Also, what is the error that you're getting? Is it that hashstd::string On Mon, Jul 7, 2014 at 8:02 PM, likan999 notifications@github.com wrote:
|
@tudor, the specialization is copied from String.h to demonstrate the problem. Simply including "String.h" can also reproduce the same issue. The error is the code successfully compiles under libc++ but at runtime the assertion fails. I guess the culprit is libc++ has a different hash implementation. I guess the specialization was introduced when c++11 was not yet fully implemented by mainline compilers and hash was not available. But since hash is in C++11 standard, and major compilers supports c++11 faily well, it is no longer needed? |
You're right. Our specialization is actually broken! (because we make We haven't seen this at FB because libstdc++ provides full specializations Clearly libc++ does something different (and it's not fully standard On Tue, Jul 8, 2014 at 9:51 AM, likan999 notifications@github.com wrote:
|
The following simple program will produce error under libc++:
String.h shouldn't specialize hash function for libc++.
The text was updated successfully, but these errors were encountered: