1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-01 21:23:52 +00:00

Undef error macros at end of file

This commit is contained in:
Henry Fredrick Schreiner 2018-05-18 10:45:30 +02:00
parent db8ccf8afe
commit 9b54b6e0fe

View File

@ -13,7 +13,8 @@
namespace CLI { namespace CLI {
// Use one of these on all error classes // Use one of these on all error classes.
// These are temporary and are undef'd at the end of this file.
#define CLI11_ERROR_DEF(parent, name) \ #define CLI11_ERROR_DEF(parent, name) \
protected: \ protected: \
name(std::string name, std::string msg, int exit_code) : parent(std::move(name), std::move(msg), exit_code) {} \ 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 {
explicit OptionNotFound(std::string name) : OptionNotFound(name + " not found", ExitCodes::OptionNotFound) {} explicit OptionNotFound(std::string name) : OptionNotFound(name + " not found", ExitCodes::OptionNotFound) {}
}; };
#undef CLI11_ERROR_DEF
#undef CLI11_ERROR_SIMPLE
/// @} /// @}
} // namespace CLI } // namespace CLI