FRIDAY, OCTOBER 9, 2026
libstdc++
libstdc++: Include range_access.h from <simd>
Fixes C++ <simd> header to correctly expose std::begin/end.
This change addresses LWG issue 4385 by ensuring that the C++ <simd> header now correctly includes <bits/ranges_access.h>. This modification makes std::begin and std::end available when <simd> is included, providing necessary range access functionalities. A new test case has been added to verify this functionality.
In Details
The <simd> header in libstdc++ was missing the inclusion of <bits/ranges_access.h>, which defines std::begin, std::end, and related range access functions. This prevents users from calling these functions on ranges provided by <simd> or indirectly through it. The fix adds the necessary include, resolving LWG 4385 and improving usability of the SIMD library.
For Context
- LWG4385
- A specific issue (numbered 4385) raised with the Library Working Group (LWG) of the C++ Standards Committee, detailing a problem with the C++ standard library.
- std::begin, std::end
- Functions in the C++ standard library that return iterators to the beginning and one-past-the-end of a range, respectively. They are part of the 'ranges' support.
- <simd>
- A C++ header providing facilities for single instruction, multiple data (SIMD) programming, enabling vectorized operations.