You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current beta release of boost, boost::pfr comes with a new feature for extracting the struct name from a given type. This way structopt could get rid of the library visit_struct and fully rely on boost::pfr. Or, since the new boost::pfr feature requries C++20, to still support older C++ standards , the current reflection mechanism might stay as fallback.
The text was updated successfully, but these errors were encountered:
From here, it looks to me like they figured out how to get the field names to appear in FUNCSIG strings for functions templated on the object, and then parse them out of that.
I will try and test it out soon, it seems there are some limitations, not sure how much (if at all) that would affect the structopt feature list.
Hi @xR3b0rn ! Thanks for mentions my method here! This hack is usable only for C++20 because it uses the P1907R1 standard modification. Before this, the template hack cannot be used.
I can help implement this feature.
In the current beta release of boost,
boost::pfr
comes with a new feature for extracting the struct name from a given type. This waystructopt
could get rid of the libraryvisit_struct
and fully rely onboost::pfr
. Or, since the newboost::pfr
feature requries C++20, to still support older C++ standards , the current reflection mechanism might stay as fallback.The text was updated successfully, but these errors were encountered: