From c4a616f4536146f8906e1b4412eefeec07b28fae Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 29 Jan 2018 13:58:18 -0500 Subject: [PATCH] nothrow: use noexcept for C++11 and newer In C++11, the `throw()` specifier is deprecated and `noexcept` is preffered instead. --- src/liblzma/api/lzma.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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