2 // { dg-do compile { target c++11 } }
4 template <typename _Default> struct A { using type = _Default; };
5 template <typename _Default, template <typename> class>
6 using __detected_or = A<_Default>;
7 template <typename _Default, template <typename> class _Op>
8 using __detected_or_t = typename __detected_or<_Default, _Op>::type;
9 template <typename _Tp> struct B { typedef _Tp value_type; };
11 template <typename _Tp> using __pointer = typename _Tp::pointer;
13 template <typename _Alloc> struct J : C {
14 using pointer = __detected_or_t<typename _Alloc::value_type *, __pointer>;
16 template <typename _T1> void _Construct(_T1 *) { new _T1; }
18 template <typename _ForwardIterator, typename _Size>
19 static _ForwardIterator __uninit_default_n(_ForwardIterator p1, _Size) {
21 return _ForwardIterator();
24 template <typename _ForwardIterator, typename _Size>
25 void __uninitialized_default_n(_ForwardIterator p1, _Size) {
26 D::__uninit_default_n(p1, 0);
28 template <typename _ForwardIterator, typename _Size, typename _Tp>
29 void __uninitialized_default_n_a(_ForwardIterator p1, _Size, _Tp) {
30 __uninitialized_default_n(p1, 0);
32 template <typename> struct __shared_ptr {
33 constexpr __shared_ptr() : _M_ptr(), _M_refcount() {}
37 template <typename _Alloc> struct F {
38 typedef _Alloc _Tp_alloc_type;
40 typename J<_Tp_alloc_type>::pointer _M_start;
43 F(int, _Alloc p2) : _M_impl(p2) {}
46 template <typename _Tp, typename _Alloc = B<_Tp>> struct K : F<_Alloc> {
47 typedef _Alloc allocator_type;
48 K(int, allocator_type p2 = allocator_type()) : F<_Alloc>(0, p2) {
49 __uninitialized_default_n_a(this->_M_impl._M_start, 0, 0);
55 __shared_ptr<int> trigger[1];
57 __shared_ptr<int> resetTrigger_;
59 __shared_ptr<int> triggerManager_;
62 H::H() : states_(0), triggerManager_(a) {}