Fix compilation error on some versions of GCC

src/libexpr/primops.cc:42:8: error: looser throw specifier for 'virtual nix::InvalidPathError::~InvalidPathError()'
src/libexpr/nixexpr.hh:12:1: error:   overriding 'virtual nix::EvalError::~EvalError() noexcept (true)'

http://hydra.nixos.org/build/12385750
This commit is contained in:
Eelco Dolstra 2014-07-09 12:14:40 +02:00
parent beac05c206
commit 0e5d0c1543
2 changed files with 3 additions and 2 deletions

View file

@ -44,6 +44,7 @@ struct InvalidPathError : EvalError
Path path; Path path;
InvalidPathError(const Path & path) : InvalidPathError(const Path & path) :
EvalError(format("path `%1%' is not valid") % path), path(path) {}; EvalError(format("path `%1%' is not valid") % path), path(path) {};
~InvalidPathError() throw () { };
}; };

View file

@ -41,8 +41,8 @@ public:
BaseError(const FormatOrString & fs, unsigned int status = 1); BaseError(const FormatOrString & fs, unsigned int status = 1);
~BaseError() throw () { }; ~BaseError() throw () { };
const char * what() const throw () { return err.c_str(); } const char * what() const throw () { return err.c_str(); }
const string & msg() const throw () { return err; } const string & msg() const { return err; }
const string & prefix() const throw () { return prefix_; } const string & prefix() const { return prefix_; }
BaseError & addPrefix(const FormatOrString & fs); BaseError & addPrefix(const FormatOrString & fs);
}; };