Landing: c8c1f777617d

Project / Subsystem

gcc / libstdc++

Date

2026-07-10

Author

Tomasz Kamiński

Commit

c8c1f777617df6f1816900b779f32c80e016d7bd

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
c8c1f777617df6f1816900b779f32c80e016d7bd
source_type
github
headline
libstdc++: Validate bound consistently in repeat_view constructors.
tldr
Ensures non-negative bound checks in `std::ranges::repeat_view` constructors.
author
Tomasz Kamiński
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • ranges
  • error handling
  • cpp20
discussion_id_link
bugzilla_pr
date
2026-07-10T00:00:00.000Z

The constructors for std::ranges::repeat_view now consistently validate that the bound (specifying the number of repetitions) is non-negative. This change addresses LWG3772 by adding assertions for both the value-based and piecewise_construct_t constructors, ensuring that unsigned bound types are handled correctly and preventing runtime errors or unexpected behavior with negative bounds.