Eric Fiselier | 5526348 | 2016-02-20 05:28:30 +0000 | [diff] [blame] | 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 | // <set> |
| 11 | |
| 12 | // Check that std::set and it's iterators can be instantiated with an incomplete |
| 13 | // type. |
| 14 | |
| 15 | #include <set> |
| 16 | |
| 17 | struct A { |
| 18 | typedef std::set<A> Set; |
| 19 | int data; |
| 20 | Set m; |
| 21 | Set::iterator it; |
| 22 | Set::const_iterator cit; |
| 23 | }; |
| 24 | |
| 25 | inline bool operator==(A const& L, A const& R) { return &L == &R; } |
| 26 | inline bool operator<(A const& L, A const& R) { return L.data < R.data; } |
| 27 | int main() { |
| 28 | A a; |
| 29 | } |