
Allow deque and deque::iterator instantiation with incomplete element type. This is an ABI breaking change, and it is only enabled if LIBCXX_ABI_VERSION >= 2 or LIBCXX_ABI_UNSTABLE=ON. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252350 91177308-0d34-0410-b5e6-96231b3b80d8
32 lines
681 B
C++
32 lines
681 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <deque>
|
|
|
|
// deque()
|
|
// deque::iterator()
|
|
|
|
#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()
|
|
{
|
|
A a;
|
|
assert(a.d.size() == 0);
|
|
a.it = a.d.begin();
|
|
a.it2 = a.d.rend();
|
|
}
|