Hacker News new | ask | show | jobs
by bartwe 1296 days ago
c# got this right, enforcing the lifetime of Span<>
1 comments

I keep considering writing a `unique_span` and `shared_span`. Really `span` or (a type it’s based on) should have been templated on the pointer type, so a `span<shared_ptr<const T[]>>` for example.