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 and its iterators can be instantiated with an incomplete
13// type.
14
15#include <map>
16
17struct A {
18    typedef std::map<A, A> Map;
19    int data;
20    Map m;
21    Map::iterator it;
22    Map::const_iterator cit;
23};
24
25inline bool operator==(A const& L, A const& R) { return &L == &R; }
26inline bool operator<(A const& L, A const& R)  { return L.data < R.data; }
27int main() {
28    A a;
29}
30