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// <map> 11 12// Check that std::map fails to instantiate if the comparison predicate is 13// not copy-constructible. This is LWG issue 2436 14 15#include <map> 16 17template <class T> 18struct Comp { 19 bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } 20 21 Comp () {} 22private: 23 Comp (const Comp &); // declared but not defined 24 }; 25 26 27int main() { 28 std::map<int, int, Comp<int> > m; 29} 30