3 ms·
A nice way to declare command line options and arguments. I expected already templates, but some of the generated code looks strange: static VISIT_STRUCT_CONST
by ho_schi 6y ago
A nice way to declare command line options and arguments. I expected already templates, but some of the generated code looks strange:
static VISIT_STRUCT_CONSTEXPR const int max_visitable_members = 69;
https://github.com/p-ranav/structopt/blob/master/single_include/structopt/structopt.hpp#L270 https://github.com/p-ranav/structopt/blob/master/single_incl...
- aldanor 6y agoThis is a copy/paste from a boost header, with some renaming.
- hoistbypetard 6y agoIt's this: https://github.com/p-ranav/structopt/blob/master/include/structopt/third_party/visit_struct/visit_struct.hpp https://github.com/p-ranav/structopt/blob/master/include/str... mashed into a single header with some other stuff by a build tool, I think. That looks like something that was proposed for inclusion in boost a long time ago. I think it eventually got accepted after some renaming :) The amount of preprocessor magic in that file makes my head hurt.