1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <functional>
11 
12 //  Hashing a struct w/o a defined hash should fail.
13 
14 #include <functional>
15 #include <cassert>
16 #include <type_traits>
17 
18 struct X {};
19 
20 int main()
21 {
22     X x;
23     size_t h = std::hash<X>{} ( x );
24 }
25