aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/std/ranges/conv/lwg4229.cc
blob: 780ed1fd932b8a0a8f356f0a96c5281048630958 (plain)
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);
}