
6 Dec
2024
6 Dec
'24
7:07 p.m.
Claudio DeSouza wrote:
The compiler can still see the max value being passed in and your example block has a fixed extent. By using first<> you get another span of fixed extent.
block has a fixed extent, but block.subspan(i * 4) does not. ...
On 12/6/24 21:46, Claudio DeSouza via Boost wrote:
detail::read32le( block.subspan(i * 4).first<4>());
So you also get a sized span, and avoid checks.