//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Check that std::unordered_set fails to instantiate if the hash function is // not copy-constructible. This is mentioned in LWG issue 2436 #include template struct Hash { std::size_t operator () (const T& lhs) const { return 0; } Hash () {} private: Hash (const Hash &); // declared but not defined }; int main() { std::unordered_set > m; }