From b80a0046fc7e9520603a4cb2fbdf468d5e1fdf42 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Thu, 3 May 2018 15:59:01 +0200 Subject: [PATCH] GCC 4.7 can't tell a function from a string. Separated and fixed. --- include/CLI/App.hpp | 8 ++++---- include/CLI/Option.hpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index 22b3370f..5de6ac72 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -538,7 +538,7 @@ class App { }; Option *opt = add_option(name, fun, description, false); - opt->set_type_name( + opt->set_type_name_fn( [&options]() { return std::string(detail::type_name()) + " in {" + detail::join(options) + "}"; }); return opt; @@ -589,7 +589,7 @@ class App { }; Option *opt = add_option(name, fun, description, defaulted); - opt->set_type_name( + opt->set_type_name_fn( [&options]() { return std::string(detail::type_name()) + " in {" + detail::join(options) + "}"; }); if(defaulted) { std::stringstream out; @@ -648,7 +648,7 @@ class App { }; Option *opt = add_option(name, fun, description, false); - opt->set_type_name([&options]() { + opt->set_type_name_fn([&options]() { return std::string(detail::type_name()) + " in {" + detail::join(options) + "}"; }); @@ -708,7 +708,7 @@ class App { }; Option *opt = add_option(name, fun, description, defaulted); - opt->set_type_name([&options]() { + opt->set_type_name_fn([&options]() { return std::string(detail::type_name()) + " in {" + detail::join(options) + "}"; }); if(defaulted) { diff --git a/include/CLI/Option.hpp b/include/CLI/Option.hpp index f56749fb..352a230c 100644 --- a/include/CLI/Option.hpp +++ b/include/CLI/Option.hpp @@ -631,11 +631,11 @@ class Option : public OptionBase