slides: https://docs.google.com/presentation/...
Abstract: C++20 concepts give us a brand new way to specify how our generic libraries and algorithms should be used and allow library users to better understand what is expected of them. However, concepts didn't rise from chaos, and before their adoption C++ library authors had other mechanisms to meet that goal. In this talk I'll briefly discuss concepts, and focus on their pros and cons compared to more mature mechanisms. Special attention will be given to the 'semantic' vs. 'syntactic' nature of concepts, and I'll try to give motivating examples of semantic-only concepts. I'll then explore best practices, and show potential pitfalls in various approaches to the challenge of defining interactions between generic code authors and users.
Talk outline:
Problem statement, examples of 'concepts in the wild' (iterator traits, trivially-copyable, ordering)
Brief overview of C++20 concepts - syntax alternatives, common examples
Pre-concepts typical approaches - mainly type-traits, iterator_traits, void_t, enable_if
Tricky cases: semantics vs. syntax; common/subtle 'bugs'; explicit call-site override
'Philosophical' discussion on core concepts - cheaply-copyable, trivially-copyable