From 102adcf0205ce5aac4cdab3b48ef5c3c44af68f1 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Sun, 28 Jul 2024 04:06:36 +0200 Subject: [PATCH] [Help] Sort options! --- include/clopts.hh | 67 +++++++++++++++++++++++++++++++++++++++++++---- test/test.cc | 12 ++++----- 2 files changed, 68 insertions(+), 11 deletions(-) diff --git a/include/clopts.hh b/include/clopts.hh index 18bba99..36d056e 100644 --- a/include/clopts.hh +++ b/include/clopts.hh @@ -570,6 +570,11 @@ constexpr void While(bool& cond, auto&& lambda) { (impl.template operator()() and ...); } +// TODO: Use pack indexing once the syntax is fixed and compilers +// have actually started defining __cpp_pack_indexing. +template +using nth_type = std::tuple_element_t>; + /// Check if an option is a regular option. template struct regular_option { @@ -606,6 +611,52 @@ struct filter_impl> { template