mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@278300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03, c++11
|
||||
|
||||
// <functional>
|
||||
|
||||
// make sure that we can hash enumeration values
|
||||
@@ -14,8 +16,6 @@
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
#if TEST_STD_VER >= 14
|
||||
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#include <type_traits>
|
||||
@@ -59,6 +59,3 @@ int main()
|
||||
|
||||
test<Fruits>();
|
||||
}
|
||||
#else
|
||||
int main () {}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user