#include #include namespace po = boost::program_options; int main (int argc, char *argv[]) { // 1st group po::options_description groups1 ("Option group 1"); groups1.add_options() ("opt1", "Short option 1") ("option 2", "Short option 2\n^\nAligned here"); // 2nd group po::options_description groups2 ("Option group 2"); groups2.add_options() ("much_longer_option", po::value(), ("Misaligned description " "in 2nd group if option " "column length > magic 23 " "character limit\n^\n" "Aligned here")); po::options_description cmdline_args("Overall"); cmdline_args.add(groups1); cmdline_args.add(groups2); std::cerr << cmdline_args << "\n"; return 0; }