3 // { dg-options "-fsanitize=vptr -std=gnu++11" }
5 template <typename X, X> struct K
7 static constexpr X v = 0;
10 template <typename...> struct A;
11 template <typename X, typename Y>
15 template <typename X> X M ();
16 template <typename...> struct B;
17 template <typename X, typename Y>
18 struct B<X, Y> : K<int, noexcept (static_cast<X>(M<Y>()))>
21 template <typename X, typename... Y>
22 struct G : A<int, B<X, Y...>>::t
25 template <typename X> struct J : G<X, X&&>
28 template <typename X> X&& foo (X&);
29 template <typename X> X&& bar (X&&);
30 template <typename X> struct P
35 template <typename...> struct Q;
42 Q (Q&& x) noexcept (J<X>::v) : r (foo<X>(s (x)))
46 template <typename... X> struct I : Q<X...>
49 I (X&... x) : Q<X...>(x...)
53 template <typename... X>
54 I<X&&...> baz (X&&... x)
56 return I <X&&...> (foo<X>(x)...);
58 template <typename X> struct F
61 void operator[] (X&& x)