r244748 - in /trunk/libstdc++-v3: ChangeLog inc...

ville@gcc.gnu.org ville@gcc.gnu.org
Sat Jan 21 15:38:00 GMT 2017


Author: ville
Date: Sat Jan 21 15:38:23 2017
New Revision: 244748

URL: https://gcc.gnu.org/viewcvs?rev=244748&root=gcc&view=rev
Log:
Make poisoned hashes SFINAE away the call operator of the hash.
* include/bits/functional_hash.h
(__poison_hash::__enable_hash_call): New.
* include/std/optional (__optional_hash_call_base): New.
(hash<optional<_Tp>>): Derive from the new base,
move the hash function into that base.
* include/std/variant (__variant_hash_call_base_impl): New.
(__variant_hash_call_base): Likewise.
(hash<variant<_Types...>>): Derive from the new base,
move the hash function into that base.
* testsuite/20_util/optional/hash.cc: Add tests for is_callable.
* testsuite/20_util/variant/hash.cc: Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/functional_hash.h
    trunk/libstdc++-v3/include/std/optional
    trunk/libstdc++-v3/include/std/variant
    trunk/libstdc++-v3/testsuite/20_util/optional/hash.cc
    trunk/libstdc++-v3/testsuite/20_util/variant/hash.cc



More information about the Libstdc++-cvs mailing list