A Short Life span<> For a Regular Mess - std::span
summary
Argues that std::span is a borrow type with shallow-copy semantics, not a regular container: equality operators were removed rather than commit to confusing deep or shallow comparisons, making span effectively semi-regular. Recommends using span and string_view only as cheap by-value function parameters, not stored long-term. Notes practical tooling: GSL, clang-tidy checks and upcoming clang -Wdangling-gsl warnings that catch dangling temporaries. Surveys future work (multi-dimensional span, range-based views) and explains why these design choices matter.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:27Fundamentals of Programming
- 4:04Mathematical Foundations
- 8:28Principles of C++ Design
- 12:39STL Design Philosophy
- 15:10Concepts and Requirements
- 18:20Equality and Ordering
- 20:26Spaceship Operator
- 23:25String View analysis
- 27:52Std::span design and use
- 34:09Span evolution and issues
- 39:13Semi-regular types
- 43:30Borrow type safety
- 47:57Implementation and caveats
- 50:42Future directions and ranges
- 51:58Conclusion
- 52:54Q&A Session








