Commit 56c85b1e224d2e22cc703812e5c8cc819b01e8a5
1 parent
1bf66bc3
Recovering GCC 4.7 support
Showing
1 changed file
with
4 additions
and
3 deletions
include/CLI/Error.hpp
| ... | ... | @@ -21,12 +21,13 @@ struct Error : public std::runtime_error { |
| 21 | 21 | // Construction errors (not in parsing) |
| 22 | 22 | |
| 23 | 23 | struct ConstructionError : public Error { |
| 24 | - using Error::Error; | |
| 24 | + // Using Error::Error constructors seem to not work on GCC 4.7 | |
| 25 | + ConstructionError(std::string parent, std::string name, int exit_code=255, bool print_help=true) : Error(parent, name, exit_code, print_help) {} | |
| 25 | 26 | }; |
| 26 | 27 | |
| 27 | 28 | /// Thrown when an option is set to conflicting values (non-vector and multi args, for example) |
| 28 | 29 | struct IncorrectConstruction : public ConstructionError { |
| 29 | - IncorrectConstruction(std::string name) : ConstructionError("ConstructionError", name, 8) {} | |
| 30 | + IncorrectConstruction(std::string name) : ConstructionError("IncorrectConstruction", name, 8) {} | |
| 30 | 31 | }; |
| 31 | 32 | |
| 32 | 33 | /// Thrown on construction of a bad name |
| ... | ... | @@ -43,7 +44,7 @@ struct OptionAlreadyAdded : public ConstructionError { |
| 43 | 44 | |
| 44 | 45 | /// Anything that can error in Parse |
| 45 | 46 | struct ParseError : public Error { |
| 46 | - using Error::Error; | |
| 47 | + ParseError(std::string parent, std::string name, int exit_code=255, bool print_help=true) : Error(parent, name, exit_code, print_help) {} | |
| 47 | 48 | }; |
| 48 | 49 | |
| 49 | 50 | // Not really "errors" | ... | ... |