Boost logo

Boost :

From: Claudio DeSouza (cdesouza_at_[hidden])
Date: 2024-12-06 21:51:40


So to go back to my point: If you really want to avoid checks, and you do
know the size beforehand, you can entirely avoid it by harnessing this type
of compile-time information and leveraging the compiler in your favour. It
all depends how dedicated you are to make sure you get that. Granted, with
dynamic extent the number of checks will depend on several factors,
including implementation, and hardening settings the user is building with.

It is win after win with span.

On Fri, Dec 6, 2024 at 9:47 PM Andrey Semashev via Boost <
boost_at_[hidden]> wrote:

> On 12/7/24 00:42, Vinnie Falco wrote:
> > On Fri, Dec 6, 2024 at 1:38 PM Andrey Semashev via Boost
> > <boost_at_[hidden] <mailto:boost_at_[hidden]>> wrote:
> >
> > Unless this is a new addition, I don't see such a member in
> std::span.
> >
> > https://en.cppreference.com/w/cpp/container/span/subspan <https://
> > en.cppreference.com/w/cpp/container/span/subspan>
>
> Ah, yes, I missed this, thanks.
>
> Anyway, it doesn't work as the offset is a runtime value in this case.
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk