Concepts, Type Traits and Specialization

Опубликовано: 07 Март 2025
на канале: CoreCppIL
622
17

Presented by Roi Barkan at Core C++ meetup [online], Dec 2020.

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 explore best practices, and show potential pitfalls in various approaches to the challenge of defining interactions between generic code authors and users.

Roi Barkan is a professional software developer and architect since 2000, his main focus throughout his career was on high performance and distributed systems, implementing complex and innovative algorithms. He has been VP technologies of Istra Research since 2014, where he helps creating low latency financial systems.