diff options
Diffstat (limited to 'src/errors.hh')
| -rw-r--r-- | src/errors.hh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/errors.hh b/src/errors.hh index d8b3d60..b7b0143 100644 --- a/src/errors.hh +++ b/src/errors.hh @@ -13,12 +13,14 @@ namespace src { class Errors { public: virtual ~Errors() = default; + Errors(Errors const&) = delete; + Errors& operator=(Errors const&) = delete; virtual void err(Location loc, std::string_view msg) = 0; virtual void warn(Location loc, std::string_view msg) = 0; -#if !defined(NDEBUG) +#ifndef NDEBUG virtual void dbg(Location loc, std::string_view msg) = 0; #else void dbg(Location, std::string_view) {} @@ -31,22 +33,18 @@ class Errors { protected: Errors() = default; - - Errors(Errors const&) = delete; - Errors& operator=(Errors const&) = delete; }; class ErrorsOutput { public: virtual ~ErrorsOutput() = default; + ErrorsOutput(ErrorsOutput const&) = delete; + ErrorsOutput& operator=(ErrorsOutput const&) = delete; virtual void println(std::string_view line) = 0; protected: ErrorsOutput() = default; - - ErrorsOutput(ErrorsOutput const&) = delete; - ErrorsOutput& operator=(ErrorsOutput const&) = delete; }; [[nodiscard]] |
