mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
nothrow: use noexcept for C++11 and newer
In C++11, the `throw()` specifier is deprecated and `noexcept` is preffered instead.
This commit is contained in:
parent
fb6d4f83cb
commit
bc19799169
1 changed files with 5 additions and 1 deletions
|
@ -219,7 +219,11 @@
|
||||||
*/
|
*/
|
||||||
#ifndef lzma_nothrow
|
#ifndef lzma_nothrow
|
||||||
# if defined(__cplusplus)
|
# if defined(__cplusplus)
|
||||||
|
# if __cplusplus >= 201103L
|
||||||
|
# define lzma_nothrow noexcept
|
||||||
|
# else
|
||||||
# define lzma_nothrow throw()
|
# define lzma_nothrow throw()
|
||||||
|
# endif
|
||||||
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
||||||
# define lzma_nothrow __attribute__((__nothrow__))
|
# define lzma_nothrow __attribute__((__nothrow__))
|
||||||
# else
|
# else
|
||||||
|
|
Loading…
Reference in a new issue