6 Oct
2020
6 Oct
'20
12:30 p.m.
Andrzej Krzemienski wrote:
But this is only for tuple_size. If you do a for_each, the compilation breaks:
``` Z z {{}, {}, {}}; boost::pfr::for_each_field(z, [](auto const&){}); ```
Yes, you're right. 1>C:\boost-git\develop\boost/pfr/detail/core17_generated.hpp(57): error : cannot decompose class type 'Z': both it and its base class 'X' have non-static data members That's an annoying (and unnecessary IMO) limitation of structured bindings. Someone should write a paper to lift it (instead of just posting to the reflector as I did.)