Boost logo

Boost :

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


>
> I think, the answer to memory safety won't be the span as the argument
> type, which will only get in the way in the hasher implementation, but a
> markup of the pointer+size arguments so that the compiler is able to
> reason about the buffer size anyway. I think, MSVC and gcc already have
> attributes of that kind, though I'm not sure what exactly the compilers
> are able to do with them. Maybe, those attributes need to be
> standardized instead of pushing span everywhere.
>
> It depends what you mean by this, but span already offers compile time
fixed extants, that can be used with generic algorithms and entirely elide
the runtime checks, if you want to support that type of generic construct.

Claudio.


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