1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// { dg-do compile { target c++23 } } // LWG 4229 std::ranges::to with union return type #include <ranges> union U { template<std::ranges::input_range R> U(std::from_range_t, R&&) { } int i; }; void test_lwg4229(std::ranges::subrange<int*> r) { U u = std::ranges::to<U>(r); }