Allow to build with intel c++ compiler

This commit is contained in:
Guillaume Fraux
2017-06-12 15:04:59 +02:00
parent 0d9b910d5d
commit 57cc7f77c1
5 changed files with 32 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ namespace toml
struct exception : public std::exception
{
public:
virtual ~exception() override = default;
virtual ~exception() noexcept override = default;
virtual const char* what() const noexcept override {return "";}
};
@@ -18,7 +18,7 @@ struct syntax_error : public toml::exception
public:
explicit syntax_error(const std::string& what_arg) : what_(what_arg){}
explicit syntax_error(const char* what_arg) : what_(what_arg){}
virtual ~syntax_error() override = default;
virtual ~syntax_error() noexcept override = default;
virtual const char* what() const noexcept override {return what_.c_str();}
protected:
@@ -30,7 +30,7 @@ struct type_error : public toml::exception
public:
explicit type_error(const std::string& what_arg) : what_(what_arg){}
explicit type_error(const char* what_arg) : what_(what_arg){}
virtual ~type_error() override = default;
virtual ~type_error() noexcept override = default;
virtual const char* what() const noexcept override {return what_.c_str();}
protected:
@@ -42,7 +42,7 @@ struct internal_error : public toml::exception
public:
explicit internal_error(const std::string& what_arg) : what_(what_arg){}
explicit internal_error(const char* what_arg) : what_(what_arg){}
virtual ~internal_error() override = default;
virtual ~internal_error() noexcept override = default;
virtual const char* what() const noexcept override {return what_.c_str();}
protected:
std::string what_;