From 788c3f58cbd372d744f8fdfe3c5c1f639c69c324 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 09:01:30 -0800 Subject: [PATCH] chore(deps): pre-commit.ci autoupdate (#799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): pre-commit.ci autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0) - [github.com/pre-commit/mirrors-clang-format: v14.0.6 → v15.0.4](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.6...v15.0.4) - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.3 → v3.0.0-alpha.4](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.3...v3.0.0-alpha.4) * style: pre-commit.ci fixes Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- include/CLI/TypeTools.hpp | 40 +++++++++++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed6d06d5..14d633d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -21,7 +21,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v14.0.6 + rev: v15.0.4 hooks: - id: clang-format types_or: [c++, c, cuda] @@ -33,7 +33,7 @@ repos: additional_dependencies: [pyyaml] - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.0-alpha.3" + rev: "v3.0.0-alpha.4" hooks: - id: prettier types_or: [yaml, markdown, html, css, scss, javascript, json] diff --git a/include/CLI/TypeTools.hpp b/include/CLI/TypeTools.hpp index 65105c88..d55aec7f 100644 --- a/include/CLI/TypeTools.hpp +++ b/include/CLI/TypeTools.hpp @@ -43,7 +43,9 @@ constexpr enabler dummy = {}; template using enable_if_t = typename std::enable_if::type; /// A copy of std::void_t from C++17 (helper for C++11 and C++14) -template struct make_void { using type = void; }; +template struct make_void { + using type = void; +}; /// A copy of std::void_t from C++17 - same reasoning as enable_if_t, it does not hurt to redefine template using void_t = typename make_void::type; @@ -72,10 +74,14 @@ template struct is_copyable_ptr { }; /// This can be specialized to override the type deduction for IsMember. -template struct IsMemberType { using type = T; }; +template struct IsMemberType { + using type = T; +}; /// The main custom type needed here is const char * should be a string. -template <> struct IsMemberType { using type = std::string; }; +template <> struct IsMemberType { + using type = std::string; +}; namespace detail { @@ -85,7 +91,9 @@ namespace detail { /// pointer_traits be valid. /// not a pointer -template struct element_type { using type = T; }; +template struct element_type { + using type = T; +}; template struct element_type::value>::type> { using type = typename std::pointer_traits::element_type; @@ -93,7 +101,9 @@ template struct element_type struct element_value_type { using type = typename element_type::type::value_type; }; +template struct element_value_type { + using type = typename element_type::type::value_type; +}; /// Adaptor for set-like structure: This just wraps a normal container in a few utilities that do almost nothing. template struct pair_adaptor : std::false_type { @@ -354,7 +364,9 @@ auto value_string(const T &value) -> decltype(to_string(value)) { } /// template to get the underlying value type if it exists or use a default -template struct wrapped_type { using type = def; }; +template struct wrapped_type { + using type = def; +}; /// Type size for regular object types that do not look like a tuple template struct wrapped_type::value>::type> { @@ -362,7 +374,9 @@ template struct wrapped_type struct type_count_base { static const int value{0}; }; +template struct type_count_base { + static const int value{0}; +}; /// Type size for regular object types that do not look like a tuple template @@ -392,7 +406,9 @@ template struct subtype_count; template struct subtype_count_min; /// This will only trigger for actual void type -template struct type_count { static const int value{0}; }; +template struct type_count { + static const int value{0}; +}; /// Type size for regular object types that do not look like a tuple template @@ -443,7 +459,9 @@ template struct subtype_count { }; /// This will only trigger for actual void type -template struct type_count_min { static const int value{0}; }; +template struct type_count_min { + static const int value{0}; +}; /// Type size for regular object types that do not look like a tuple template @@ -492,7 +510,9 @@ template struct subtype_count_min { }; /// This will only trigger for actual void type -template struct expected_count { static const int value{0}; }; +template struct expected_count { + static const int value{0}; +}; /// For most types the number of expected items is 1 template