blob: 4f9a6d61be4ae2c6687481b497724778c89e57e7 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
// <set>
// Check that std::multiset fails to instantiate if the comparison predicate is
// not copy-constructible. This is LWG issue 2436
#include <set>
template <class T>
struct Comp {
bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; }
Comp () {}
private:
Comp (const Comp &); // declared but not defined
};
int main() {
std::multiset<int, Comp<int> > m;
}