diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-08 07:48:16 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-09 04:47:05 -0700 |
commit | f27a27f49e650b13ec3857c7ff6429e24010e160 (patch) | |
tree | 8f2aab61de98d2baa9a9e00f5858ecffedd6f025 /src | |
parent | 7eb15e13aa3e0233bdd75b570ddcf68cefa5b7ca (diff) |
Remove `EXCEPTION_NEEDS_THROW_SPEC`
We're on C++ 20 now, we don't need this
(cherry picked from commit faaccecbc82d98288582bdc8ca96991796561371)
Change-Id: I172fa336107fd18b1aac2262309682e0d7065d07
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/error.hh | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh index 00dbd7ae2..d67b26e0f 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -31,15 +31,6 @@ #include <sys/stat.h> #include <fcntl.h> -/* Before 4.7, gcc's std::exception uses empty throw() specifiers for - * its (virtual) destructor and what() in c++11 mode, in violation of spec - */ -#ifdef __GNUC__ -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) -#define EXCEPTION_NEEDS_THROW_SPEC -#endif -#endif - namespace nix { @@ -147,13 +138,7 @@ public: : err(e) { } -#ifdef EXCEPTION_NEEDS_THROW_SPEC - ~BaseError() throw () { }; - const char * what() const throw () { return calcWhat().c_str(); } -#else const char * what() const noexcept override { return calcWhat().c_str(); } -#endif - const std::string & msg() const { return calcWhat(); } const ErrorInfo & info() const { calcWhat(); return err; } |