aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2018-01-29 13:58:18 -0500
committerLasse Collin <lasse.collin@tukaani.org>2018-02-06 18:41:45 +0200
commitbc197991690ede24ab143665b5b0f0f9cb35cc46 (patch)
tree30c7e2febc3b11f1f56c48c068ddec99c7a2262c /src/liblzma
parentliblzma: Remove incorrect #ifdef from range_common.h. (diff)
downloadxz-bc197991690ede24ab143665b5b0f0f9cb35cc46.tar.xz
nothrow: use noexcept for C++11 and newer
In C++11, the `throw()` specifier is deprecated and `noexcept` is preffered instead.
Diffstat (limited to 'src/liblzma')
-rw-r--r--src/liblzma/api/lzma.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h
index ce675a78..aa88e424 100644
--- a/src/liblzma/api/lzma.h
+++ b/src/liblzma/api/lzma.h
@@ -219,7 +219,11 @@
*/
#ifndef lzma_nothrow
# if defined(__cplusplus)
-# define lzma_nothrow throw()
+# if __cplusplus >= 201103L
+# define lzma_nothrow noexcept
+# else
+# define lzma_nothrow throw()
+# endif
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define lzma_nothrow __attribute__((__nothrow__))
# else