Skip to main content
  1. Tags/

Metaprogramming

2026


Annotations in C++26 static reflection

·1317 words·7 mins

C++26 added static reflection to the already big bag of compile-time features. One of the most powerful tools that made it into the language is the ability to use custom annotations and to inspect them at compile time. Here, we will see how to define and use annotations, and how to pass various arguments to them that can be extracted through reflection.

More ...