Upgrade CLI11 to 2.3.1 (#3301)

This commit is contained in:
github-actions[bot]
2022-11-02 03:11:27 +00:00
committed by GitHub
parent 3f371430ae
commit 79cb12eaef
+39 -26
View File
@@ -1,11 +1,11 @@
// CLI11: Version 2.3.0
// CLI11: Version 2.3.1
// Originally designed by Henry Schreiner
// https://github.com/CLIUtils/CLI11
//
// This is a standalone header file generated by MakeSingleHeader.py in CLI11/scripts
// from: v2.3.0
// from: v2.3.1
//
// CLI11 2.3.0 Copyright (c) 2017-2022 University of Cincinnati, developed by Henry
// CLI11 2.3.1 Copyright (c) 2017-2022 University of Cincinnati, developed by Henry
// Schreiner under NSF AWARD 1414736. All rights reserved.
//
// Redistribution and use in source and binary forms of CLI11, with or without
@@ -34,34 +34,34 @@
#pragma once
// Standard combined includes:
#include <iterator>
#include <fstream>
#include <tuple>
#include <iostream>
#include <cstdint>
#include <algorithm>
#include <stdexcept>
#include <map>
#include <iomanip>
#include <utility>
#include <vector>
#include <functional>
#include <locale>
#include <string>
#include <cmath>
#include <numeric>
#include <cstdint>
#include <iomanip>
#include <memory>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <type_traits>
#include <set>
#include <limits>
#include <set>
#include <utility>
#include <map>
#include <iostream>
#include <numeric>
#include <fstream>
#include <tuple>
#define CLI11_VERSION_MAJOR 2
#define CLI11_VERSION_MINOR 3
#define CLI11_VERSION_PATCH 0
#define CLI11_VERSION "2.3.0"
#define CLI11_VERSION_PATCH 1
#define CLI11_VERSION "2.3.1"
@@ -2671,7 +2671,7 @@ class Config {
if(item.inputs.empty()) {
return "{}";
}
throw ConversionError::TooManyInputsFlag(item.fullname());
throw ConversionError::TooManyInputsFlag(item.fullname()); // LCOV_EXCL_LINE
}
/// Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure
@@ -3478,7 +3478,7 @@ class AsNumberWithUnit : public Validator {
// transform function
func_ = [mapping, opts](std::string &input) -> std::string {
Number num;
Number num{};
detail::rtrim(input);
if(input.empty()) {
@@ -3742,7 +3742,7 @@ CLI11_INLINE path_type check_path(const char *file) noexcept {
return path_type::nonexistent;
}
switch(stat.type()) {
case std::filesystem::file_type::none:
case std::filesystem::file_type::none: // LCOV_EXCL_LINE
case std::filesystem::file_type::not_found:
return path_type::nonexistent;
case std::filesystem::file_type::directory:
@@ -3993,6 +3993,8 @@ class FormatterBase {
FormatterBase() = default;
FormatterBase(const FormatterBase &) = default;
FormatterBase(FormatterBase &&) = default;
FormatterBase &operator=(const FormatterBase &) = default;
FormatterBase &operator=(FormatterBase &&) = default;
/// Adding a destructor in this form to work around bug in GCC 4.7
virtual ~FormatterBase() noexcept {} // NOLINT(modernize-use-equals-default)
@@ -4054,6 +4056,8 @@ class Formatter : public FormatterBase {
Formatter() = default;
Formatter(const Formatter &) = default;
Formatter(Formatter &&) = default;
Formatter &operator=(const Formatter &) = default;
Formatter &operator=(Formatter &&) = default;
/// @name Overridables
///@{
@@ -7307,6 +7311,15 @@ CLI11_NODISCARD CLI11_INLINE CLI::App_p App::get_subcommand_ptr(int index) const
throw OptionNotFound(std::to_string(index));
}
CLI11_NODISCARD CLI11_INLINE CLI::App *App::get_option_group(std::string group_name) const {
for(const App_p &app : subcommands_) {
if(app->name_.empty() && app->group_ == group_name) {
return app.get();
}
}
throw OptionNotFound(group_name);
}
CLI11_NODISCARD CLI11_INLINE std::size_t App::count_all() const {
std::size_t cnt{0};
for(const auto &opt : options_) {
@@ -9469,7 +9482,7 @@ CLI11_INLINE std::string Formatter::make_footer(const App *app) const {
if(footer.empty()) {
return std::string{};
}
return footer + "\n";
return "\n" + footer + "\n";
}
CLI11_INLINE std::string Formatter::make_help(const App *app, std::string name, AppFormatMode mode) const {
@@ -9491,7 +9504,7 @@ CLI11_INLINE std::string Formatter::make_help(const App *app, std::string name,
out << make_positionals(app);
out << make_groups(app, mode);
out << make_subcommands(app, mode);
out << '\n' << make_footer(app);
out << make_footer(app);
return out.str();
}