blob: d50b56ff1efcddb9438ebfc9f11b73f8ed0001c1 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// <set>
// Check that std::set and its iterators can be instantiated with an incomplete
// type.
#include <set>
#include "test_macros.h"
struct A {
typedef std::set<A> Set;
int data;
Set m;
Set::iterator it;
Set::const_iterator cit;
};
inline bool operator==(A const& L, A const& R) { return &L == &R; }
inline bool operator<(A const& L, A const& R) { return L.data < R.data; }
int main(int, char**) {
A a;
return 0;
}