Commit Graph

6 Commits

Author SHA1 Message Date
Eric Fiselier
0c2ffb6670 Choose better hash values for std::monostate and valueless variants.
Previously these hashes were 0 and -1 respectively. These seem like common
sentinel values and should be avoided to prevent needless collisions.

This patch changes those values to different arbitrary numbers, which should
hopefully cause less collisions. Because I couldn't help myself I choose the
fundamental constants for gravity and the speed of light.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288623 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 21:37:37 +00:00
Eric Fiselier
5b0fa443aa Fix <variant> w/o exception support
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288571 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-03 01:58:07 +00:00
Eric Fiselier
a2ff798745 Fix C++03 build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288555 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 23:41:18 +00:00
Eric Fiselier
120401a4e0 Make variant's index part of the hash value
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288554 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 23:38:31 +00:00
Eric Fiselier
4975ccc637 Fix generated warnings in <variant>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288552 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 23:17:33 +00:00
Eric Fiselier
cab2af8418 Implement C++17 <variant>. Patch from Michael Park!
This patch was reviewed as https://reviews.llvm.org/D23263.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288547 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 23:00:05 +00:00