Implement LWG 2148: Make non-enum default hash specialization well-formed
authorEric Fiselier <eric@efcs.ca>
Wed, 10 Aug 2016 22:45:26 +0000 (22:45 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 10 Aug 2016 22:45:26 +0000 (22:45 +0000)
commit45b7b44867f75098c4235bda09fa088d0cb803f3
tree206bf3d88372f96d14a10f5f28749896e745a49c
parentee1f578d627cddc71c691ba53f469ed114159454
Implement LWG 2148: Make non-enum default hash specialization well-formed

Summary:
This patch removes the static_assert for non-enum types in the primary hash template. Instead non-enum types create a hash<T> specialization that is not constructible nor callable.

See also:
  * http://cplusplus.github.io/LWG/lwg-active.html#2543
  * https://llvm.org/bugs/show_bug.cgi?id=28917

Reviewers: mclow.lists, EricWF

Subscribers: mehdi_amini, cfe-commits

Differential Revision: https://reviews.llvm.org/D23331

llvm-svn: 278300
libcxx/include/functional
libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
libcxx/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp [new file with mode: 0644]