A screenshot from the linked article titled "Reflection in C++26", showing reflection as one of the bullet points listed in the "Core Language" section
I can see the footguns, but I can also see the huge QoL improvement - no more std::enable_if spam to check if a class type has a member, if you can just check for them.
... at least I hope it would be less ugly than std::enable_if.
There's a pretty big difference though. To my understanding enable_if happens at compile time, while reflection typically happens at runtime. Using the latter would cause a pretty big performance impact over a (large) list of data.
I imagine reflections would make the process more straightforward, requires expressions are powerful but either somewhat verbose or possibly incomplete.
For instance, in your example foo could have any of the following declarations in a class:
I'm not sure if there's anything enable_if can do that concepts can't do somewhat better but yeah there's definitely a lot of subtleties that reflection is going to make nicer or possible in the first place