Commit 788c3f58cbd372d744f8fdfe3c5c1f639c69c324

Authored by pre-commit-ci[bot]
Committed by GitHub
1 parent b16c8c8c

chore(deps): pre-commit.ci autoupdate (#799)

* 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
... ... @@ -9,7 +9,7 @@ repos:
9 9 - id: black
10 10  
11 11 - repo: https://github.com/pre-commit/pre-commit-hooks
12   - rev: v4.3.0
  12 + rev: v4.4.0
13 13 hooks:
14 14 - id: check-added-large-files
15 15 - id: check-case-conflict
... ... @@ -21,7 +21,7 @@ repos:
21 21 - id: trailing-whitespace
22 22  
23 23 - repo: https://github.com/pre-commit/mirrors-clang-format
24   - rev: v14.0.6
  24 + rev: v15.0.4
25 25 hooks:
26 26 - id: clang-format
27 27 types_or: [c++, c, cuda]
... ... @@ -33,7 +33,7 @@ repos:
33 33 additional_dependencies: [pyyaml]
34 34  
35 35 - repo: https://github.com/pre-commit/mirrors-prettier
36   - rev: "v3.0.0-alpha.3"
  36 + rev: "v3.0.0-alpha.4"
37 37 hooks:
38 38 - id: prettier
39 39 types_or: [yaml, markdown, html, css, scss, javascript, json]
... ...
include/CLI/TypeTools.hpp
... ... @@ -43,7 +43,9 @@ constexpr enabler dummy = {};
43 43 template <bool B, class T = void> using enable_if_t = typename std::enable_if<B, T>::type;
44 44  
45 45 /// A copy of std::void_t from C++17 (helper for C++11 and C++14)
46   -template <typename... Ts> struct make_void { using type = void; };
  46 +template <typename... Ts> struct make_void {
  47 + using type = void;
  48 +};
47 49  
48 50 /// A copy of std::void_t from C++17 - same reasoning as enable_if_t, it does not hurt to redefine
49 51 template <typename... Ts> using void_t = typename make_void<Ts...>::type;
... ... @@ -72,10 +74,14 @@ template &lt;typename T&gt; struct is_copyable_ptr {
72 74 };
73 75  
74 76 /// This can be specialized to override the type deduction for IsMember.
75   -template <typename T> struct IsMemberType { using type = T; };
  77 +template <typename T> struct IsMemberType {
  78 + using type = T;
  79 +};
76 80  
77 81 /// The main custom type needed here is const char * should be a string.
78   -template <> struct IsMemberType<const char *> { using type = std::string; };
  82 +template <> struct IsMemberType<const char *> {
  83 + using type = std::string;
  84 +};
79 85  
80 86 namespace detail {
81 87  
... ... @@ -85,7 +91,9 @@ namespace detail {
85 91 /// pointer_traits<T> be valid.
86 92  
87 93 /// not a pointer
88   -template <typename T, typename Enable = void> struct element_type { using type = T; };
  94 +template <typename T, typename Enable = void> struct element_type {
  95 + using type = T;
  96 +};
89 97  
90 98 template <typename T> struct element_type<T, typename std::enable_if<is_copyable_ptr<T>::value>::type> {
91 99 using type = typename std::pointer_traits<T>::element_type;
... ... @@ -93,7 +101,9 @@ template &lt;typename T&gt; struct element_type&lt;T, typename std::enable_if&lt;is_copyable
93 101  
94 102 /// Combination of the element type and value type - remove pointer (including smart pointers) and get the value_type of
95 103 /// the container
96   -template <typename T> struct element_value_type { using type = typename element_type<T>::type::value_type; };
  104 +template <typename T> struct element_value_type {
  105 + using type = typename element_type<T>::type::value_type;
  106 +};
97 107  
98 108 /// Adaptor for set-like structure: This just wraps a normal container in a few utilities that do almost nothing.
99 109 template <typename T, typename _ = void> struct pair_adaptor : std::false_type {
... ... @@ -354,7 +364,9 @@ auto value_string(const T &amp;value) -&gt; decltype(to_string(value)) {
354 364 }
355 365  
356 366 /// template to get the underlying value type if it exists or use a default
357   -template <typename T, typename def, typename Enable = void> struct wrapped_type { using type = def; };
  367 +template <typename T, typename def, typename Enable = void> struct wrapped_type {
  368 + using type = def;
  369 +};
358 370  
359 371 /// Type size for regular object types that do not look like a tuple
360 372 template <typename T, typename def> struct wrapped_type<T, def, typename std::enable_if<is_wrapper<T>::value>::type> {
... ... @@ -362,7 +374,9 @@ template &lt;typename T, typename def&gt; struct wrapped_type&lt;T, def, typename std::en
362 374 };
363 375  
364 376 /// This will only trigger for actual void type
365   -template <typename T, typename Enable = void> struct type_count_base { static const int value{0}; };
  377 +template <typename T, typename Enable = void> struct type_count_base {
  378 + static const int value{0};
  379 +};
366 380  
367 381 /// Type size for regular object types that do not look like a tuple
368 382 template <typename T>
... ... @@ -392,7 +406,9 @@ template &lt;typename T&gt; struct subtype_count;
392 406 template <typename T> struct subtype_count_min;
393 407  
394 408 /// This will only trigger for actual void type
395   -template <typename T, typename Enable = void> struct type_count { static const int value{0}; };
  409 +template <typename T, typename Enable = void> struct type_count {
  410 + static const int value{0};
  411 +};
396 412  
397 413 /// Type size for regular object types that do not look like a tuple
398 414 template <typename T>
... ... @@ -443,7 +459,9 @@ template &lt;typename T&gt; struct subtype_count {
443 459 };
444 460  
445 461 /// This will only trigger for actual void type
446   -template <typename T, typename Enable = void> struct type_count_min { static const int value{0}; };
  462 +template <typename T, typename Enable = void> struct type_count_min {
  463 + static const int value{0};
  464 +};
447 465  
448 466 /// Type size for regular object types that do not look like a tuple
449 467 template <typename T>
... ... @@ -492,7 +510,9 @@ template &lt;typename T&gt; struct subtype_count_min {
492 510 };
493 511  
494 512 /// This will only trigger for actual void type
495   -template <typename T, typename Enable = void> struct expected_count { static const int value{0}; };
  513 +template <typename T, typename Enable = void> struct expected_count {
  514 + static const int value{0};
  515 +};
496 516  
497 517 /// For most types the number of expected items is 1
498 518 template <typename T>
... ...