summaryrefslogtreecommitdiffstats
path: root/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp
blob: 8179768d586f622a4048cc485b61f1f4e3a25049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

// <deque>

// deque()
// deque::iterator()

// MODULES_DEFINES: _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
#define _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
#include <deque>
#include <cassert>

struct A {
  std::deque<A> d;
  std::deque<A>::iterator it;
  std::deque<A>::reverse_iterator it2;
};

int main(int, char**)
{
  A a;
  assert(a.d.size() == 0);
  a.it = a.d.begin();
  a.it2 = a.d.rend();

  return 0;
}
OpenPOWER on IntegriCloud