2 // { dg-do compile { target c++11 } }
4 template <typename _Tp> struct A
6 static constexpr _Tp value = 1;
8 template <typename> class B
11 template <typename> struct rebind
16 template <typename _Alloc, typename _Tp> class C
18 template <typename _Alloc2, typename _Tp2>
19 static A<int> _S_chk (typename _Alloc2::template rebind<_Tp2> *);
22 using __type = decltype (_S_chk<_Alloc, _Tp> (0));
25 template <typename _Alloc, typename _Tp, int = C<_Alloc, _Tp>::__type::value>
27 template <typename _Alloc, typename _Tp> struct D<_Alloc, _Tp, 1>
29 typedef typename _Alloc::template rebind<_Tp> __type;
31 template <typename _Alloc> struct F
33 template <typename _Tp> using rebind_alloc = typename D<_Alloc, _Tp>::__type;
35 template <typename _Alloc> struct __alloc_traits
37 template <typename> struct rebind
39 typedef typename F<_Alloc>::template rebind_alloc<int> other;
42 template <typename _Alloc> struct G
44 typename __alloc_traits<_Alloc>::template rebind<int>::other _Tp_alloc_type;
46 template <typename _Tp, typename _Alloc = B<_Tp> > class vector : G<_Alloc>
50 template <int> using tfuncptr = void();
51 template <int d> struct H
53 vector<tfuncptr<d> > funcs;