C Template Metaprogramming Concepts -

Introduced heavily in , these are standard metafunctions used to query properties of types. They allow your code to ask questions like: "Is this type a pointer?" ( std::is_pointer ) "Are these two types the same?" ( std::is_same ) "Can I add these two types together?" 5. Concepts (C++20)

Uses static constexpr to return a result (e.g., calculating a factorial at compile time). C Template Metaprogramming Concepts

In standard C++, a function takes values and returns a value. In TMP, a takes types or constants and "returns" a new type or constant. Introduced heavily in , these are standard metafunctions

Concepts are the modern evolution of TMP. Instead of relying on complex SFINAE "hacks" to restrict templates, allow you to explicitly define requirements for template arguments using the requires keyword. This makes error messages much more readable and the code intent clearer. 6. Variable Templates and constexpr In standard C++, a function takes values and returns a value