Le 2021-03-15 08:47, Alexander Grund via Boost a écrit :
Am 14.03.21 um 18:33 schrieb Peter Dimov via Boost:
I.e. the problem with the toggles is, that they are toggles only. It
is impossible to return both static and not-static members, which
especially for functions is useful
In general it is impossible to return ALL members, e.g.
`boost::mp11::mp_for_each` could be useful,
especially for a compiler implementation
I've been thinking about that, and i believe reversing the modifiers
could give a cleaner interface for doing it. ie, something like:
describe_members --> returns everything
describe_members --> returns only the
function, whatever their visibility is, and whether they are inherited
or not.
describe_members --> returns only the
members (data or functions) that are not inherited
describe_members --> returns only the members
(data or functions) that are not static
describe_members --> returns only the data members that are not
inherited and not static (could be provided as an alias,
mod_filter_self_data_members_only)
From what i have seen, it may event be built on top of the current
describe machinery (there is, i believe, pretty much everything in the
details namespace to implement it without touching the macros and the
current model).
Regards,
Julien