r/cpp • u/pavel_v • Apr 24 '26
C++26: Structured Bindings can introduce a Pack
https://www.sandordargo.com/blog/2026/04/22/cpp26-structured-bindings-packs
101
Upvotes
r/cpp • u/pavel_v • Apr 24 '26
View all comments
Show parent comment
3
u/_Noreturn Apr 27 '26 edited Apr 27 '26
I have an auto generated header that is for reflecting a struct
here it is https://github.com/ZXShady/lahzam/blob/main/include%2Flahzam%2Fgenerated.hpp
The way it is implememnted is via a long chain of
if (auto [m0] = klass) auto [m0] = klass;repeat that up to 256 and you have this massive file. I can just doauto [...members] = klassand be done with itCan it be done another way? Until reflection no. atleast while being constexpr