Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incompatibility when using libcxx #148

Merged
merged 1 commit into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <execinfo.h>
#endif

#include <array>
#include <cstring>
#include <sstream>

Expand Down Expand Up @@ -100,7 +101,7 @@ const string &Error::backtrace() const
{ return backtrace_; }


const char* Error::what() const _GLIBCXX_USE_NOEXCEPT
const char* Error::what() const noexcept
{ return msg_.c_str(); }


Expand Down Expand Up @@ -173,7 +174,7 @@ const string &ConfigError::filename() const
const string &ConfigError::reason() const
{ return reason_; }

const char* ConfigError::what() const _GLIBCXX_USE_NOEXCEPT
const char* ConfigError::what() const noexcept
{ return msg_.c_str(); }


Expand Down
4 changes: 2 additions & 2 deletions src/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Error : public std::exception {
public:
Error(const string &message = "");

virtual const char* what() const _GLIBCXX_USE_NOEXCEPT override;
virtual const char* what() const noexcept override;
const string &backtrace() const;
};

Expand Down Expand Up @@ -115,7 +115,7 @@ class ConfigError : public ExpectedError {
void set_filename(const string &filename);
const string &filename() const;
const string &reason() const;
virtual const char* what() const _GLIBCXX_USE_NOEXCEPT override;
virtual const char* what() const noexcept override;
#ifdef USE_YAML
ConfigError(const string &filename, const YAML::Mark &mark, const string &input, const string &msg);
#endif
Expand Down