forked from mirror/libcxx
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
910 B
C++
39 lines
910 B
C++
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// 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.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <unordered_set>
|
|
|
|
// Check that std::unordered_multiset and its iterators can be instantiated with an incomplete
|
|
// type.
|
|
|
|
#include <unordered_set>
|
|
|
|
template <class Tp>
|
|
struct MyHash {
|
|
MyHash() {}
|
|
std::size_t operator()(Tp const&) const {return 42;}
|
|
};
|
|
|
|
struct A {
|
|
typedef std::unordered_multiset<A, MyHash<A> > Map;
|
|
Map m;
|
|
Map::iterator it;
|
|
Map::const_iterator cit;
|
|
Map::local_iterator lit;
|
|
Map::const_local_iterator clit;
|
|
};
|
|
|
|
inline bool operator==(A const& L, A const& R) { return &L == &R; }
|
|
|
|
int main() {
|
|
A a;
|
|
}
|