2 // { dg-do compile { target c++14 } }
4 template<typename T> T&& declval() noexcept;
6 template<typename... _Tp>
10 struct common_type<_Tp>
11 { typedef _Tp type; };
13 template<typename _Tp, typename _Up>
14 struct common_type<_Tp, _Up>
15 { typedef decltype(true ? declval<_Tp>() : declval<_Up>()) type; };
17 template<typename _Tp, typename _Up, typename... _Vp>
18 struct common_type<_Tp, _Up, _Vp...>
21 common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
24 template<typename... _Tp>
25 using common_type_t = typename common_type<_Tp...>::type;
27 template <typename... TFs>
30 using rt = common_type_t<decltype(fs(0))...>;
31 return [](auto) -> rt { };