summaryrefslogtreecommitdiff
path: root/src/localconsts.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-30 21:18:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-30 21:18:24 +0300
commit9ff808fb20962884d56147d46c8e4de915a0735d (patch)
treeb09025e75c2e57a48e5be971953edbc14b466846 /src/localconsts.h
parentaaa274245a584c633dcfdb5444bbc1dc21c0c28f (diff)
downloadmv-9ff808fb20962884d56147d46c8e4de915a0735d.tar.gz
mv-9ff808fb20962884d56147d46c8e4de915a0735d.tar.bz2
mv-9ff808fb20962884d56147d46c8e4de915a0735d.tar.xz
mv-9ff808fb20962884d56147d46c8e4de915a0735d.zip
Disable noexcept for clang and old gcc versions.
Diffstat (limited to 'src/localconsts.h')
-rw-r--r--src/localconsts.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/localconsts.h b/src/localconsts.h
index dc63ad87b..df49f8098 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -27,6 +27,8 @@
#define CAST_U32 static_cast<uint32_t>
#define CAST_SIZE static_cast<size_t>
+//#define noexcept2
+
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
@@ -38,27 +40,42 @@
#define override
#define constexpr
#define constexpr2
+#define noexcept2
#define noexcept
#define A_DELETE(func)
#define A_DELETE_COPY(func)
#else // !defined(__GXX_EXPERIMENTAL_CXX0X__)
#if GCC_VERSION < 40700
+
+#if defined(__clang__) && __cplusplus > 201100L
+#else // __clang__
#define final
#define override
#define constexpr
#define noexcept
+#endif // __clang__
+#define noexcept2
+
// #define A_DELETE
// #define A_DELETE_COPY
#else // GCC_VERSION < 40700
#define ADVGCC
#if GCC_VERSION < 40900
#define constexpr2
+#define noexcept2
#else // GCC_VERSION < 40900
#if __cpp_constexpr >= 201304
#define constexpr2 constexpr
#else // __cpp_constexpr >= 201304
#define constexpr2
#endif // __cpp_constexpr >= 201304
+
+#ifdef __clang__
+#define noexcept2
+#else // __clang__
+#define noexcept2 noexcept
+#endif // __clang__
+
#endif // GCC_VERSION < 40900
#endif // GCC_VERSION < 40700
#undef Z_NULL