aboutsummaryrefslogtreecommitdiff
path: root/xml/details/config.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-31 12:57:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-31 12:57:38 +0200
commit665b6242fc338bb21ee8ac5131012cf6d230ed1e (patch)
tree7eee3cfa76277eb395e46ee07047860a0d881fd5 /xml/details/config.hxx
parent77bc33bcdf611d0f5c703d3d8e20d6f5aff8814c (diff)
Work around symbol exporting issues, throw() deprecation
Diffstat (limited to 'xml/details/config.hxx')
-rw-r--r--xml/details/config.hxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/xml/details/config.hxx b/xml/details/config.hxx
index da76390..656880a 100644
--- a/xml/details/config.hxx
+++ b/xml/details/config.hxx
@@ -5,6 +5,32 @@
#ifndef XML_DETAILS_CONFIG_HXX
#define XML_DETAILS_CONFIG_HXX
+// C++11 support.
+//
+#ifdef _MSC_VER
+# if _MSC_VER >= 1900
+# define STUDXML_CXX11_NOEXCEPT
+# endif
+#else
+# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+# ifdef __clang__ // Pretends to be a really old __GNUC__ on some platforms.
+# define STUDXML_CXX11_NOEXCEPT
+# elif defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
+# define STUDXML_CXX11_NOEXCEPT
+# endif
+# else
+# define STUDXML_CXX11_NOEXCEPT
+# endif
+# endif
+#endif
+
+#ifdef STUDXML_CXX11_NOEXCEPT
+# define STUDXML_NOTHROW_NOEXCEPT noexcept
+#else
+# define STUDXML_NOTHROW_NOEXCEPT throw()
+#endif
+
// Note: the same in expat/config.h
//
#ifdef LIBSTUDXML_BUILD2