Loading…
CppCon 2019 has ended
Back To Schedule
Tuesday, September 17 • 09:00 - 10:00
Rethinking the Way We Do Templates in C++

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

Template metaprogramming is hard. In case it is hard only for the library implementer then it is not that bad. The problem arises when it also affects the users of this library.

This talk is summarizing my experience and thoughts gathered during the implementation of the Physical Units Library for C++. The way we do template metaprogramming now results with inscrutable compile-time errors and really long type names observed while debugging our code. That is mostly caused by aliasing class template specializations of non-trivial metaprogramming interface designs. Compilation times of such code also leave a lot of room for improvement, and the practices we chose to use in the Standard Library are often suboptimal. Taking into account the Rule of Chiel while designing templated code makes a huge difference in the compile times. This talk presents a few simple examples (including the practices from the C++ Standard Library) of achieving the same goal in different ways and provides benchmark results of time needed to compile such source code.

Speakers
avatar for Mateusz Pusz

Mateusz Pusz

Principal Software Engineer | Founder & C++ Trainer, EPAM Systems | Train IT
A software architect, principal engineer, and security champion with more than 15 years of experience in designing, writing, and maintaining C++ code for fun and living. A trainer with 10 years of C++ teaching experience, consultant, conference speaker, and evangelist. His main areas... Read More →


Tuesday September 17, 2019 09:00 - 10:00 MDT
Aurora C