// PR c++/56611 // { dg-do compile { target c++11 } } template struct remove_reference { typedef T type; }; template struct remove_reference { typedef T type; }; template T declval() { return T(); } int f(int, int){return 0;} struct Func{}; template using result2 = decltype(f(declval::type>()...)); template struct R; template struct R< This(Args...) > { typedef result2 type; }; typedef R< Func(int, int) >::type R_type;