On Tue, 8 Apr 2025, Patrick Palka wrote:

> Tested on x86_64-pc-linux-gnu, does this look OK for trunk/14?

It's not mentioned very often, but is a general rule:

Pretty please, add new files for new tests, don't just edit 
existing files.  (For one: if they start failing, they look like 
regressions.)

> diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc 
> b/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc
> index 3f1f8eb17726..5ccf47d4d300 100644
> --- a/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc
> +++ b/libstdc++-v3/testsuite/std/ranges/adaptors/as_const/1.cc
> @@ -69,10 +69,23 @@ test03()
>      auto r2 = views::as_const(views::all(v));
>  }
>  
> +void
> +test04()
> +{
> +  // PR libstdc++/115046 - meta-recursion with join_view and as_const_view
> +  int x[3] = {1,2,3};
> +  auto v = x
> +    | views::chunk(3)
> +    | views::transform(views::as_const)
> +    | views::join;
> +  VERIFY( ranges::equal(v, x) );
> +}
> +

brgds, H-P

Reply via email to