1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
10
11// <flat_set>
12
13// Check that std::flat_multiset and its iterators can be instantiated with an incomplete
14// type.
15
16#include <flat_set>
17#include <vector>
18
19struct A {
20 using Set = std::flat_multiset<A>;
21 int data;
22 Set m;
23 Set::iterator it;
24 Set::const_iterator cit;
25};
26
27// Implement the operator< required in order to instantiate flat_multiset<A>
28bool operator<(A const& L, A const& R) { return L.data < R.data; }
29
30void test() { A a; }
31
32int main(int, char**) {
33 test();
34
35 return 0;
36}
37

source code of libcxx/test/std/containers/container.adaptors/flat.multiset/incomplete_type.pass.cpp