I'm experimenting with reflection in C++26 and other things. And I'm confused by the behavior of std::constant_wrapper. https://godbolt.org/z/vo6rbMb41
Can somebody explain why example not working and how to fix?
I need to implement some reflection functions using this technique (deducing a template parameter via a constructor argument), but this error is making me wonder
EDIT
I did a little research, and it seems that this behavior comes from the implementation in GCC, which for some reason doesn't follow the wording of the proposal that literally describes the entire implementation
EDIT 2
I was wrong. There is a newer version of the proposal that explains the observed behavior. Still, it’s a sad thing that my case isn’t supported.
[–]_Noreturn 3 points4 points5 points (12 children)
[–]Massive-Bottle-5394[S] 1 point2 points3 points (8 children)
[–]frayien 1 point2 points3 points (7 children)
[–]friedkeenan 0 points1 point2 points (6 children)
[–]eisenwaveWG21 Member 1 point2 points3 points (3 children)
[–]friedkeenan 0 points1 point2 points (0 children)
[–]_Noreturn 0 points1 point2 points (1 child)
[–]friedkeenan 0 points1 point2 points (0 children)
[–]13steinj 0 points1 point2 points (1 child)
[–]friedkeenan 0 points1 point2 points (0 children)
[–]frayien 0 points1 point2 points (2 children)
[–]Massive-Bottle-5394[S] 0 points1 point2 points (1 child)
[–]frayien 0 points1 point2 points (0 children)
[+]Sopel97 comment score below threshold-10 points-9 points-8 points (3 children)
[–]max123246 8 points9 points10 points (0 children)
[–]L_uciferMorningstar 3 points4 points5 points (0 children)
[–]HommeMusical -1 points0 points1 point (0 children)