CppCon 2019 has ended
Back To Schedule
Tuesday, September 17 • 09:00 - 10:00
A Short Life span<> For a Regular Mess

Log in to save this to your schedule, view media, leave feedback and see who's attending!

By now you probably heard about “Regular Types and Why Do I Care” :)
This would be Part 2 of the journey we’ll take together, where we get a chance to explore std::span<T> through our Regular lens. Don’t worry if you’ve missed Part 1; we’ll have plenty of time to revisit the important bits, as we prepare to span our grasp into C++20.
“Regular” is not exactly a new concept. If we reflect back on STL and its design principles, as best described by Alexander Stepanov in his “Fundamentals of Generic Programming” paper, we see that regular types naturally appear as necessary foundational concepts in programming. Why do we need to bother with such taxonomies ? Because STL assumes such properties about the types it deals with and imposes such conceptual requirements for its data structures and algorithms to work properly. C++20 Concepts are based on precisely defined foundational type requirements such as Semiregular, Regular, EqualityComparable, etc.
Recent STL additions such as std::string_view, std::reference_wrapper, std::optional, as well as new incoming types for C++20 like std::span or std::function_ref raise new questions regarding values types, reference types and non-owning “borrow” types. Designing and implementing regular types is crucial in everyday programing, not just library design. Properly constraining types and function prototypes will result in intuitive usage; conversely, breaking subtle contracts for functions and algorithms will result in unexpected behavior for the caller.
This talk will explore the relation between Regular types (and other concepts) and new STL additions like std::span<T> with examples, common pitfalls and guidance.

avatar for Victor Ciura

Victor Ciura

Principal Engineer, Visual C++ / Microsoft
Victor Ciura is a Principal Engineer on the Visual C++ team, helping to improve the tools he’s been using for years. Leading engineering efforts across multiple teams working on making Visual Studio the best IDE for C++ Game developers.   Before joining Microsoft, he programmed... Read More →

Tuesday September 17, 2019 09:00 - 10:00 MDT
Crest 3