diff options
| author | Stephen Sinclair <radarsat1@gmail.com> | 2017-08-22 20:20:12 -0300 |
|---|---|---|
| committer | Stephen Sinclair <radarsat1@gmail.com> | 2017-08-22 20:20:12 -0300 |
| commit | 8feb1dab32cad4bdaf772fb8b5eced0f33e92750 (patch) | |
| tree | 41583b271ec530c3c9bdec389de95924a70373cd /RtAudio.h | |
| parent | d75b9e7f29f2423a6e3b1d39b3ef76c6a8d5025e (diff) | |
Fix std::exception noexcept-related compile error
Diffstat (limited to 'RtAudio.h')
| -rw-r--r-- | RtAudio.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -52,6 +52,10 @@ #include <exception> #include <iostream> +#ifndef _GLIBCXX_USE_NOEXCEPT +#define _GLIBCXX_USE_NOEXCEPT +#endif + /*! \typedef typedef unsigned long RtAudioFormat; \brief RtAudio data format type. @@ -217,7 +221,7 @@ class RtAudioError : public std::exception RtAudioError( const std::string& message, Type type = RtAudioError::UNSPECIFIED ) : message_(message), type_(type) {} //! The destructor. - virtual ~RtAudioError( void ) {} + virtual ~RtAudioError( void ) _GLIBCXX_USE_NOEXCEPT {} //! Prints thrown error message to stderr. virtual void printMessage( void ) const { std::cerr << '\n' << message_ << "\n\n"; } @@ -229,7 +233,7 @@ class RtAudioError : public std::exception virtual const std::string& getMessage(void) const { return message_; } //! Returns the thrown error message as a c-style string. - virtual const char* what( void ) const { return message_.c_str(); } + virtual const char* what( void ) const _GLIBCXX_USE_NOEXCEPT { return message_.c_str(); } protected: std::string message_; |
