Choose better hash values for std::monostate and valueless variants.
authorEric Fiselier <eric@efcs.ca>
Sun, 4 Dec 2016 21:37:37 +0000 (21:37 +0000)
committerEric Fiselier <eric@efcs.ca>
Sun, 4 Dec 2016 21:37:37 +0000 (21:37 +0000)
commit02460bac8bc2c8c84ef1813fb30f22a64352a6ef
tree113f9d408982b945f902ab94221ed0423c06388f
parent7f4e0766f17da3aa5d6e651452ba756d42f188ff
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.

llvm-svn: 288623
libcxx/include/variant