format exlcude for gcc12 support

master v0.1.6
cobrapitz 3 years ago
parent bffde2d040
commit 46d91adbdd

@ -18,6 +18,9 @@
#endif
//#define CB_EXCLUDE_FORMATTED_PRINTS
#include "cb/test/test.h"
#include "cb/time/time.h"
#include "cb/types/types.h"

@ -186,9 +186,11 @@ std::string cb::argparser::ArgumentParser::get_help() {
if (not positional_arguments.empty()) {
help_message += "Positional Arguments:\n";
for (auto &&arg: positional_arguments) {
#ifndef CB_EXCLUDE_FORMATTED_PRINTS
help_message += std::format("{:15} {}\n",
arg.name,
arg.description);
#endif
}
help_message += "\n";
}
@ -196,10 +198,12 @@ std::string cb::argparser::ArgumentParser::get_help() {
if (not arguments.empty()) {
help_message += "Arguments:\n";
for (auto &&arg: arguments) {
#ifndef CB_EXCLUDE_FORMATTED_PRINTS
help_message += std::format("{:5} {:15} {}\n",
arg.short_name,
arg.name,
arg.description);
#endif
}
help_message += "\n";
}

Loading…
Cancel
Save