Commit 9b54b6e0fe8634e2be18426d2368ebdd2d792a5d
1 parent
db8ccf8a
Undef error macros at end of file
Showing
1 changed file
with
5 additions
and
1 deletions
include/CLI/Error.hpp
| @@ -13,7 +13,8 @@ | @@ -13,7 +13,8 @@ | ||
| 13 | 13 | ||
| 14 | namespace CLI { | 14 | namespace CLI { |
| 15 | 15 | ||
| 16 | -// Use one of these on all error classes | 16 | +// Use one of these on all error classes. |
| 17 | +// These are temporary and are undef'd at the end of this file. | ||
| 17 | #define CLI11_ERROR_DEF(parent, name) \ | 18 | #define CLI11_ERROR_DEF(parent, name) \ |
| 18 | protected: \ | 19 | protected: \ |
| 19 | name(std::string name, std::string msg, int exit_code) : parent(std::move(name), std::move(msg), exit_code) {} \ | 20 | name(std::string name, std::string msg, int exit_code) : parent(std::move(name), std::move(msg), exit_code) {} \ |
| @@ -289,6 +290,9 @@ class OptionNotFound : public Error { | @@ -289,6 +290,9 @@ class OptionNotFound : public Error { | ||
| 289 | explicit OptionNotFound(std::string name) : OptionNotFound(name + " not found", ExitCodes::OptionNotFound) {} | 290 | explicit OptionNotFound(std::string name) : OptionNotFound(name + " not found", ExitCodes::OptionNotFound) {} |
| 290 | }; | 291 | }; |
| 291 | 292 | ||
| 293 | +#undef CLI11_ERROR_DEF | ||
| 294 | +#undef CLI11_ERROR_SIMPLE | ||
| 295 | + | ||
| 292 | /// @} | 296 | /// @} |
| 293 | 297 | ||
| 294 | } // namespace CLI | 298 | } // namespace CLI |