// { dg-do compile { target c++17 } } // LWG 3528. make_from_tuple can perform (the equivalent of) a C-style cast #include #include #include template using make_t = decltype(std::make_from_tuple(std::declval())); template constexpr bool can_make = false; template constexpr bool can_make>> = true; static_assert( can_make> ); static_assert( can_make&> ); static_assert( can_make&> ); static_assert( can_make> ); static_assert( can_make&&> ); static_assert( can_make, std::pair> ); static_assert( can_make, std::array> ); static_assert( can_make> ); static_assert( can_make> ); static_assert( can_make> ); static_assert( ! can_make> ); static_assert( ! can_make> ); static_assert( ! can_make&> ); static_assert( ! can_make> ); static_assert( ! can_make> ); static_assert( ! can_make> ); static_assert( ! can_make> ); static_assert( ! can_make> ); static_assert( ! can_make> ); struct Two { Two(const char*, int); }; static_assert( can_make> ); static_assert( ! can_make> ); static_assert( can_make> ); static_assert( ! can_make> ); static_assert( ! can_make, std::array> );