Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings gcc11 C++17 #805

Closed
ferdymercury opened this issue Nov 21, 2022 · 4 comments
Closed

Warnings gcc11 C++17 #805

ferdymercury opened this issue Nov 21, 2022 · 4 comments

Comments

@ferdymercury
Copy link
Contributor

When including CLI11 in my program (C++17 standard), I get the following warnings. Is there anything I am doing incorrectly, or are these known?
Thanks.

/opt/CLI11/include/CLI/App.hpp:1358: warning: redundant redeclaration of ‘std::string CLI::FailureMessage::simple(const CLI::App*, const CLI::Error&)’ in same scope [-Wredundant-decls]
In file included from bth.cpp:8:
/opt/CLI11/include/CLI/App.hpp:1358:26: warning: redundant redeclaration of ‘std::string CLI::FailureMessage::simple(const CLI::App*, const CLI::Error&)’ in same scope [-Wredundant-decls]
 1358 | CLI11_INLINE std::string simple(const App *app, const Error &e);
      |                          ^~~~~~
/opt/CLI11/include/CLI/App.hpp:52:13: note: previous declaration of ‘std::string CLI::FailureMessage::simple(const CLI::App*, const CLI::Error&)’
   52 | std::string simple(const App *app, const Error &e);
      |             ^~~~~~
/opt/CLI11/include/CLI/App.hpp:1361: warning: redundant redeclaration of ‘std::string CLI::FailureMessage::help(const CLI::App*, const CLI::Error&)’ in same scope [-Wredundant-decls]
/opt/CLI11/include/CLI/App.hpp:1361:26: warning: redundant redeclaration of ‘std::string CLI::FailureMessage::help(const CLI::App*, const CLI::Error&)’ in same scope [-Wredundant-decls]
 1361 | CLI11_INLINE std::string help(const App *app, const Error &e);
      |                          ^~~~
/opt/CLI11/include/CLI/App.hpp:53:13: note: previous declaration of ‘std::string CLI::FailureMessage::help(const CLI::App*, const CLI::Error&)’
   53 | std::string help(const App *app, const Error &e);
      |             ^~~~
/opt/CLI11/include/CLI/Validators.hpp:84: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Validator::<lambda()>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::Validator::<lambda()>&; _Args = {}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::Validator::<lambda()>&>, CLI::Validator::<lambda()>&>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::Validator::<lambda()>&>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void>, std::__call_is_nothrow<std::__invoke_result<CLI::Validator::<lambda()>&>, CLI::Validator::<lambda()>&> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<std::__cxx11::basic_string<char>, CLI::Validator::<lambda()>&>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<std::__cxx11::basic_string<char>, CLI::Validator::<lambda()>&>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = std::__cxx11::basic_string<char>; _Callable = CLI::Validator::<lambda()>&; _Args = {}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = std::__cxx11::basic_string<char>]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = std::__cxx11::basic_string<char>; _Functor = CLI::Validator::<lambda()>; _ArgTypes = {}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::Validator::<lambda()>; _Constraints = void; _Res = std::__cxx11::basic_string<char>; _ArgTypes = {}]’
/opt/CLI11/include/CLI/Validators.hpp:84:79:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Validator::<lambda()>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/Option.hpp:24: In file included from /opt/CLI11/include/CLI/Option.hpp:24,
In file included from /opt/CLI11/include/CLI/Option.hpp:24,
                 from /opt/CLI11/include/CLI/App.hpp:29,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/Validators.hpp:84:49: note: but ‘CLI::Validator::<lambda()>’ does not throw; perhaps it should be declared ‘noexcept’
   84 |     std::function<std::string()> desc_function_{[]() { return std::string{}; }};
      |                                                 ^
/opt/CLI11/include/CLI/Validators.hpp:88: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Validator::<lambda(std::string&)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::Validator::<lambda(std::string&)>&; _Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::Validator::<lambda(std::string&)>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>, CLI::Validator::<lambda(std::string&)>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::Validator::<lambda(std::string&)>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void>, std::__call_is_nothrow<std::__invoke_result<CLI::Validator::<lambda(std::string&)>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>, CLI::Validator::<lambda(std::string&)>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<std::__cxx11::basic_string<char>, CLI::Validator::<lambda(std::string&)>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<std::__cxx11::basic_string<char>, CLI::Validator::<lambda(std::string&)>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = std::__cxx11::basic_string<char>; _Callable = CLI::Validator::<lambda(std::string&)>&; _Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = std::__cxx11::basic_string<char>]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = std::__cxx11::basic_string<char>; _Functor = CLI::Validator::<lambda(std::string&)>; _ArgTypes = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::Validator::<lambda(std::string&)>; _Constraints = void; _Res = std::__cxx11::basic_string<char>; _ArgTypes = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]’
/opt/CLI11/include/CLI/Validators.hpp:88:96:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Validator::<lambda(std::string&)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/Option.hpp:24: In file included from /opt/CLI11/include/CLI/Option.hpp:24,
In file included from /opt/CLI11/include/CLI/Option.hpp:24,
                 from /opt/CLI11/include/CLI/App.hpp:29,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/Validators.hpp:88:53: note: but ‘CLI::Validator::<lambda(std::string&)>’ does not throw; perhaps it should be declared ‘noexcept’
   88 |     std::function<std::string(std::string &)> func_{[](std::string &) { return std::string{}; }};
      |                                                     ^
/opt/CLI11/include/CLI/Option.hpp:270: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Option::<lambda()>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::Option::<lambda()>&; _Args = {}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::Option::<lambda()>&>, CLI::Option::<lambda()>&>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::Option::<lambda()>&>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void>, std::__call_is_nothrow<std::__invoke_result<CLI::Option::<lambda()>&>, CLI::Option::<lambda()>&> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<std::__cxx11::basic_string<char>, CLI::Option::<lambda()>&>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<std::__cxx11::basic_string<char>, CLI::Option::<lambda()>&>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = std::__cxx11::basic_string<char>; _Callable = CLI::Option::<lambda()>&; _Args = {}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = std::__cxx11::basic_string<char>]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = std::__cxx11::basic_string<char>; _Functor = CLI::Option::<lambda()>; _ArgTypes = {}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::Option::<lambda()>; _Constraints = void; _Res = std::__cxx11::basic_string<char>; _ArgTypes = {}]’
/opt/CLI11/include/CLI/Option.hpp:270:75:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Option::<lambda()>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/App.hpp:29: In file included from /opt/CLI11/include/CLI/App.hpp:29,
In file included from /opt/CLI11/include/CLI/App.hpp:29,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/Option.hpp:270:45: note: but ‘CLI::Option::<lambda()>’ does not throw; perhaps it should be declared ‘noexcept’
  270 |     std::function<std::string()> type_name_{[]() { return std::string(); }};
      |                                             ^
/opt/CLI11/include/CLI/impl/App_inl.hpp:1173: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::App::_process_requirements()::<lambda(CLI::App*)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::App::_process_requirements()::<lambda(CLI::App*)>&; _Args = {CLI::App*}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::App::_process_requirements()::<lambda(CLI::App*)>&, CLI::App*>, CLI::App::_process_requirements()::<lambda(CLI::App*)>&, CLI::App*>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::App::_process_requirements()::<lambda(CLI::App*)>&, CLI::App*>, bool, void>, std::__call_is_nothrow<std::__invoke_result<CLI::App::_process_requirements()::<lambda(CLI::App*)>&, CLI::App*>, CLI::App::_process_requirements()::<lambda(CLI::App*)>&, CLI::App*> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<bool, CLI::App::_process_requirements()::<lambda(CLI::App*)>&, CLI::App*>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<bool, CLI::App::_process_requirements()::<lambda(CLI::App*)>&, CLI::App*>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = bool; _Callable = CLI::App::_process_requirements()::<lambda(CLI::App*)>&; _Args = {CLI::App*}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = bool]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = bool; _Functor = CLI::App::_process_requirements()::<lambda(CLI::App*)>; _ArgTypes = {CLI::App*}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::App::_process_requirements()::<lambda(CLI::App*)>; _Constraints = void; _Res = bool; _ArgTypes = {CLI::App*}]’
/opt/CLI11/include/CLI/impl/App_inl.hpp:1173:41:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::App::_process_requirements()::<lambda(CLI::App*)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/App.hpp:1403: In file included from /opt/CLI11/include/CLI/App.hpp:1403,
In file included from /opt/CLI11/include/CLI/App.hpp:1403,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/impl/App_inl.hpp:1173:42: note: but ‘CLI::App::_process_requirements()::<lambda(CLI::App*)>’ does not throw; perhaps it should be declared ‘noexcept’
 1173 |         auto subc_list = get_subcommands([](App *app) { return ((app->get_name().empty()) && (!app->disabled_)); });
      |                                          ^
/opt/CLI11/include/CLI/impl/App_inl.hpp:1953: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&; _Args = {long unsigned int}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>, void, void>, std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<void, CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<void, CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>&; _Args = {long unsigned int}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = void]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>; _ArgTypes = {long unsigned int}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>; _Constraints = void; _Res = void; _ArgTypes = {long unsigned int}]’
/opt/CLI11/include/CLI/impl/App_inl.hpp:1953:35:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/App.hpp:1403: In file included from /opt/CLI11/include/CLI/App.hpp:1403,
In file included from /opt/CLI11/include/CLI/App.hpp:1403,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/impl/App_inl.hpp:1953:36: note: but ‘CLI::TriggerOn(CLI::App*, CLI::App*)::<lambda(std::size_t)>’ does not throw; perhaps it should be declared ‘noexcept’
 1953 |     trigger_app->preparse_callback([app_to_enable](std::size_t) { app_to_enable->disabled(false); });
      |                                    ^
/opt/CLI11/include/CLI/impl/App_inl.hpp:1962: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&; _Args = {long unsigned int}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>, void, void>, std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<void, CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<void, CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&; _Args = {long unsigned int}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = void]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>; _ArgTypes = {long unsigned int}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>; _Constraints = void; _Res = void; _ArgTypes = {long unsigned int}]’
/opt/CLI11/include/CLI/impl/App_inl.hpp:1962:35:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/App.hpp:1403: In file included from /opt/CLI11/include/CLI/App.hpp:1403,
In file included from /opt/CLI11/include/CLI/App.hpp:1403,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/impl/App_inl.hpp:1962:36: note: but ‘CLI::TriggerOn(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>’ does not throw; perhaps it should be declared ‘noexcept’
 1962 |     trigger_app->preparse_callback([apps_to_enable](std::size_t) {
      |                                    ^
/opt/CLI11/include/CLI/impl/App_inl.hpp:1972: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&; _Args = {long unsigned int}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>, void, void>, std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<void, CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<void, CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>&; _Args = {long unsigned int}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = void]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>; _ArgTypes = {long unsigned int}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>; _Constraints = void; _Res = void; _ArgTypes = {long unsigned int}]’
/opt/CLI11/include/CLI/impl/App_inl.hpp:1972:35:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/App.hpp:1403: In file included from /opt/CLI11/include/CLI/App.hpp:1403,
In file included from /opt/CLI11/include/CLI/App.hpp:1403,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/impl/App_inl.hpp:1972:36: note: but ‘CLI::TriggerOff(CLI::App*, CLI::App*)::<lambda(std::size_t)>’ does not throw; perhaps it should be declared ‘noexcept’
 1972 |     trigger_app->preparse_callback([app_to_enable](std::size_t) { app_to_enable->disabled(); });
      |                                    ^
/opt/CLI11/include/CLI/impl/App_inl.hpp:1981: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&; _Args = {long unsigned int}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>, void, void>, std::__call_is_nothrow<std::__invoke_result<CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>, CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<void, CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<void, CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&, long unsigned int>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>&; _Args = {long unsigned int}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = void]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>; _ArgTypes = {long unsigned int}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>; _Constraints = void; _Res = void; _ArgTypes = {long unsigned int}]’
/opt/CLI11/include/CLI/impl/App_inl.hpp:1981:35:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/App.hpp:1403: In file included from /opt/CLI11/include/CLI/App.hpp:1403,
In file included from /opt/CLI11/include/CLI/App.hpp:1403,
                 from bth.cpp:8:
/opt/CLI11/include/CLI/impl/App_inl.hpp:1981:36: note: but ‘CLI::TriggerOff(CLI::App*, std::vector<CLI::App*>)::<lambda(std::size_t)>’ does not throw; perhaps it should be declared ‘noexcept’
 1981 |     trigger_app->preparse_callback([apps_to_enable](std::size_t) {
      |                                    ^
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:102: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&; _Args = {const CLI::Option*}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>, bool, void>, std::__call_is_nothrow<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<bool, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<bool, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = bool; _Callable = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&; _Args = {const CLI::Option*}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = bool]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = bool; _Functor = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>; _ArgTypes = {const CLI::Option*}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>; _Constraints = void; _Res = bool; _ArgTypes = {const CLI::Option*}]’
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:102:25:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/Formatter.hpp:24: In file included from /opt/CLI11/include/CLI/Formatter.hpp:24,
In file included from /opt/CLI11/include/CLI/Formatter.hpp:24,
                 from bth.cpp:10:
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:102:26: note: but ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>’ does not throw; perhaps it should be declared ‘noexcept’
  102 |         app->get_options([](const Option *opt) { return opt->nonpositional(); });
      |                          ^
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:107: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&; _Args = {const CLI::Option*}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>, bool, void>, std::__call_is_nothrow<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<bool, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<bool, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&, const CLI::Option*>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = bool; _Callable = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>&; _Args = {const CLI::Option*}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = bool]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = bool; _Functor = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>; _ArgTypes = {const CLI::Option*}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>; _Constraints = void; _Res = bool; _ArgTypes = {const CLI::Option*}]’
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:107:63:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/Formatter.hpp:24: In file included from /opt/CLI11/include/CLI/Formatter.hpp:24,
In file included from /opt/CLI11/include/CLI/Formatter.hpp:24,
                 from bth.cpp:10:
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:107:64: note: but ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::Option*)>’ does not throw; perhaps it should be declared ‘noexcept’
  107 |     std::vector<const Option *> positionals = app->get_options([](const Option *opt) { return opt->get_positional(); });
      |                                                                ^
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:121: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>’ [-Wnoexcept]
In file included from /usr/include/c++/11/bits/move.h:57,
                 from /usr/include/c++/11/bits/exception_ptr.h:43,
                 from /usr/include/c++/11/exception:153,
                 from /usr/include/c++/11/ios:39,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from bth.cpp:5:
/usr/include/c++/11/type_traits: In instantiation of ‘constexpr bool std::__call_is_nt(std::__invoke_other) [with _Fn = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&; _Args = {const CLI::App*}]’:
/usr/include/c++/11/type_traits:2966:34:   required from ‘struct std::__call_is_nothrow<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&, const CLI::App*>, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&, const CLI::App*>’
/usr/include/c++/11/type_traits:152:12:   required from ‘struct std::__and_<std::__is_nt_invocable_impl<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&, const CLI::App*>, bool, void>, std::__call_is_nothrow<std::__invoke_result<CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&, const CLI::App*>, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&, const CLI::App*> >’
/usr/include/c++/11/type_traits:3064:12:   required from ‘struct std::is_nothrow_invocable_r<bool, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&, const CLI::App*>’
/usr/include/c++/11/type_traits:3269:52:   required from ‘constexpr const bool std::is_nothrow_invocable_r_v<bool, CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&, const CLI::App*>’
/usr/include/c++/11/bits/invoke.h:105:14:   required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = bool; _Callable = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>&; _Args = {const CLI::App*}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = bool]’
/usr/include/c++/11/bits/std_function.h:290:30:   required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = bool; _Functor = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>; _ArgTypes = {const CLI::App*}]’
/usr/include/c++/11/bits/std_function.h:451:21:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>; _Constraints = void; _Res = bool; _ArgTypes = {const CLI::App*}]’
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:121:29:   required from here
/usr/include/c++/11/type_traits:2960:14: warning: noexcept-expression evaluates to ‘false’ because of a call to ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>’ [-Wnoexcept]
 2960 |       return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/CLI11/include/CLI/Formatter.hpp:24: In file included from /opt/CLI11/include/CLI/Formatter.hpp:24,
In file included from /opt/CLI11/include/CLI/Formatter.hpp:24,
                 from bth.cpp:10:
/opt/CLI11/include/CLI/impl/Formatter_inl.hpp:122:16: note: but ‘CLI::Formatter::make_usage(const CLI::App*, std::string) const::<lambda(const CLI::App*)>’ does not throw; perhaps it should be declared ‘noexcept’
  122 |                [](const CLI::App *subc) { return ((!subc->get_disabled()) && (!subc->get_name().empty())); })
      |                ^
@jzakrzewski
Copy link

Frankly, those warnings seem picky as hell.
I tend to include 3-party code via -isystem if I want my code to compile cleanly at high warning settings.

@ferdymercury
Copy link
Contributor Author

That's indeed a good workaround, thanks for the suggestion.

@phlptp
Copy link
Collaborator

phlptp commented Nov 22, 2022

There might be something we can do with the -Wredundant-decls warnings, but the -fnoexcept ones I don't think are worth fixing since the fix in some cases would make the code less clear and unconventional.

@phlptp
Copy link
Collaborator

phlptp commented Dec 10, 2022

-Wredundant-decls have been resolved in #813 and there are reasons not to fix the noexcept warnings for code clarity. so I am going to close this issue. Thank you for bringing it up!

@phlptp phlptp closed this as completed Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants