summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Sinclair <radarsat1@gmail.com>2017-08-22 21:11:53 -0300
committerStephen Sinclair <radarsat1@gmail.com>2017-08-22 21:16:12 -0300
commitee94a98f961163e8ddf59b8cddee32bc9f3c6b67 (patch)
tree4f1f3cbce0f3c26fe23183baaa8afadb8f930383
parent3a3f183a0bf869e47e957f26a0a6efb93c22e64f (diff)
Further fix std::exception noexcept-related compile error
-rw-r--r--RtAudio.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/RtAudio.h b/RtAudio.h
index 2bc9772..4969102 100644
--- a/RtAudio.h
+++ b/RtAudio.h
@@ -52,8 +52,16 @@
#include <exception>
#include <iostream>
-#ifndef _GLIBCXX_USE_NOEXCEPT
-#define _GLIBCXX_USE_NOEXCEPT
+#ifndef _NOEXCEPT
+#ifdef _GLIBCXX_NOEXCEPT
+#define _NOEXCEPT _GLIBCXX_NOEXCEPT
+#else
+#ifdef _GLIBCXX_USE_NOEXCEPT
+#define _NOEXCEPT _GLIBCXX_USE_NOEXCEPT
+#else
+#define _NOEXCEPT
+#endif
+#endif
#endif
/*! \typedef typedef unsigned long RtAudioFormat;
@@ -221,7 +229,7 @@ class RtAudioError : public std::exception
RtAudioError( const std::string& message, Type type = RtAudioError::UNSPECIFIED ) : message_(message), type_(type) {}
//! The destructor.
- virtual ~RtAudioError( void ) _GLIBCXX_USE_NOEXCEPT {}
+ virtual ~RtAudioError( void ) _NOEXCEPT {}
//! Prints thrown error message to stderr.
virtual void printMessage( void ) const { std::cerr << '\n' << message_ << "\n\n"; }
@@ -233,7 +241,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 _GLIBCXX_USE_NOEXCEPT { return message_.c_str(); }
+ virtual const char* what( void ) const _NOEXCEPT { return message_.c_str(); }
protected:
std::string message_;