File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -799,10 +799,10 @@ class App {
799
799
800
800
// / Add option for flag with integer result - defaults to allowing multiple passings, but can be forced to one
801
801
// / if `multi_option_policy(CLI::MultiOptionPolicy::Throw)` is used.
802
- template <typename T,
802
+ template <
803
+ typename T,
803
804
enable_if_t <std::is_constructible<T, std::int64_t >::value && !std::is_const<T>::value && !is_bool<T>::value,
804
- detail::enabler> =
805
- detail::dummy>
805
+ detail::enabler> = detail::dummy>
806
806
Option *add_flag (std::string flag_name,
807
807
T &flag_count, // /< A variable holding the count
808
808
std::string flag_description = " " ) {
Original file line number Diff line number Diff line change @@ -2314,5 +2314,5 @@ TEST_CASE("C20_compile", "simple") {
2314
2314
auto flag = app.add_flag (" --flag" , " desc" );
2315
2315
2316
2316
app.parse (" --flag" );
2317
- CHECK ( static_cast < bool >(flag ));
2317
+ CHECK_FALSE (flag-> empty ( ));
2318
2318
}
You can’t perform that action at this time.
0 commit comments