From c871aaa268c45e333658f06bb3350d195d50cfe1 Mon Sep 17 00:00:00 2001 From: "Maxim L. Grishin" Date: Tue, 16 Sep 2025 15:07:25 +0300 Subject: [PATCH 1/4] Update clipp.h, fixed to string conversion for non STL classes. --- include/clipp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/clipp.h b/include/clipp.h index d7b101e..940a14e 100644 --- a/include/clipp.h +++ b/include/clipp.h @@ -350,7 +350,7 @@ inline T clamped_on_limits(const V& v) { template struct make { static inline T from(const char* s) { - if(!s) return false; + if(!s) return T{}; //a conversion from const char* to / must exist return static_cast(s); } From 8366dd0111f1d5c0588aed84f97b79909d7e9497 Mon Sep 17 00:00:00 2001 From: "Maxim L. Grishin" Date: Thu, 23 Oct 2025 12:42:56 +0300 Subject: [PATCH 2/4] Update clipp.h - fixes for C++20 --- include/clipp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clipp.h b/include/clipp.h index 940a14e..90126d7 100644 --- a/include/clipp.h +++ b/include/clipp.h @@ -160,7 +160,7 @@ constexpr auto check_is_callable(int) -> decltype( std::declval()(std::declval()...), std::integral_constant::type>::value>{} ); + std::is_same_v>>{} ); template constexpr auto @@ -171,7 +171,7 @@ constexpr auto check_is_callable_without_arg(int) -> decltype( std::declval()(), std::integral_constant::type>::value>{} ); + std::is_same_v>>{} ); template constexpr auto From b0221d5fe83de6f63a463a50a3e72d9029f32c03 Mon Sep 17 00:00:00 2001 From: "Maxim L. Grishin" Date: Wed, 11 Mar 2026 18:50:54 +0300 Subject: [PATCH 3/4] Update clipp.h to avoid duplicates of OPPTIONS. --- include/clipp.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/clipp.h b/include/clipp.h index 90126d7..1e9c999 100644 --- a/include/clipp.h +++ b/include/clipp.h @@ -6563,7 +6563,7 @@ class documentation doc_formatting usgFmt_; filter_function filter_; enum class paragraph { param, group }; - + mutable std::set printed_param_keys_; /***************************************************************//** * @@ -6578,6 +6578,7 @@ class documentation fos.hanging_indent(0); fos.paragraph_spacing(0); fos.ignore_newline_chars(fmt_.ignore_newline_chars()); + printed_param_keys_.clear(); print_doc(fos, cli_); } @@ -6637,9 +6638,17 @@ class documentation else { const auto& p = ptrn.as_param(); if(!filter_(p)) return; + + auto label = param_label(p, fmt_); + std::string key = label.c_str(); + key += p.doc(); + + if (!printed_param_keys_.insert(key).second) { + return; + } handle_spacing(os, paragraph::param, indentLvl); - print_entry(os, param_label(p, fmt_), p.doc()); + print_entry(os, label, p.doc()); } } From 99a37dec44c3388da47a56ae38f57a74724d8aa1 Mon Sep 17 00:00:00 2001 From: "Maxim L. Grishin" Date: Wed, 11 Mar 2026 18:53:11 +0300 Subject: [PATCH 4/4] Update clipp.h fix for unordered set --- include/clipp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/clipp.h b/include/clipp.h index 1e9c999..efda1fa 100644 --- a/include/clipp.h +++ b/include/clipp.h @@ -45,7 +45,7 @@ #include #include #include - +#include /*************************************************************************//** * @@ -6563,7 +6563,7 @@ class documentation doc_formatting usgFmt_; filter_function filter_; enum class paragraph { param, group }; - mutable std::set printed_param_keys_; + mutable std::unordered_set printed_param_keys_; /***************************************************************//** *