From 56c85b1e224d2e22cc703812e5c8cc819b01e8a5 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Tue, 7 Feb 2017 14:33:37 -0500 Subject: [PATCH] Recovering GCC 4.7 support --- include/CLI/Error.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/CLI/Error.hpp b/include/CLI/Error.hpp index 72fb5d46..7e379119 100644 --- a/include/CLI/Error.hpp +++ b/include/CLI/Error.hpp @@ -21,12 +21,13 @@ struct Error : public std::runtime_error { // Construction errors (not in parsing) struct ConstructionError : public Error { - using Error::Error; + // Using Error::Error constructors seem to not work on GCC 4.7 + ConstructionError(std::string parent, std::string name, int exit_code=255, bool print_help=true) : Error(parent, name, exit_code, print_help) {} }; /// Thrown when an option is set to conflicting values (non-vector and multi args, for example) struct IncorrectConstruction : public ConstructionError { - IncorrectConstruction(std::string name) : ConstructionError("ConstructionError", name, 8) {} + IncorrectConstruction(std::string name) : ConstructionError("IncorrectConstruction", name, 8) {} }; /// Thrown on construction of a bad name @@ -43,7 +44,7 @@ struct OptionAlreadyAdded : public ConstructionError { /// Anything that can error in Parse struct ParseError : public Error { - using Error::Error; + ParseError(std::string parent, std::string name, int exit_code=255, bool print_help=true) : Error(parent, name, exit_code, print_help) {} }; // Not really "errors"