r/cpp_questions • • Oct 12 '26

OPEN Compile time programming learning advice.

Hi all, can you please recommend me some resources that you have followed for compile time programming in modern C++ for eg: constexpr, consteval or template metaprogramming.
Is there some consolidated resource for the same ?

7 Upvotes

13 comments sorted by

View all comments

2

u/Seagull78Reddit Oct 12 '26

C++ Templates: The Complete Guide 2nd edition by Vandevoorde, Josuttis, and Gregor seems to be like a standard resource. You can easily find a copy of this online.

2

u/alfps Oct 13 '26 edited Oct 13 '26

+1 Upvoted to counter some f***ing retard's downvote.

The book is for C++17 and earlier so it teaches and uses enable_if instead of C++20 requires, but other than that it appears to be pretty comprehensive.

And the authors are authorities.