r/cpp • u/StockyDev • Jun 01 '26
Validating Callable Parameters with C++20 and C++26 Static Reflection
https://kstocky.github.io/blog/validating-callable-parameters/Hi all! I wrote a new blog series to figure out how much easier static reflection makes it to implement a type trait which is fairly difficult to implement pre-static reflection.
If all you care about is the static reflection bit, here is the link to just that section.
Enjoy!
41
Upvotes
View all comments
Show parent comment
1
u/StockyDev Jun 01 '26
You can write meta-programming functions to do the same thing as those. And arguably that would be better than a language feature because you would be able to customize what gets resolved to a ref and what does not. Unreal Engine has them, but they don't get wide use.
I know Herb has a talk where he talked about in/out/inout in his Cpp2 syntax.