|
|
|
|
|
by loeg
210 days ago
|
|
That's what std::string_view and std::span are, though. They're views / borrows over the underlying data, minus the kind of protections something like Rust has about lifetimes of the underlying data vs the borrow. The benefit of these types is that they're a pair of pointer+size, instead of just a bare pointer without a known size. |
|