Refactor noexcept macros
Define noexcept using _MSC_VER instead of _MSC_FULL_VER (first release of MSVC 2015 should have it), remove redundant PUGIXML_HAS_NOEXCEPT and define PUGIXML_NOEXCEPT_IF_NOT_COMPACT in terms of PUGIXML_NOEXCEPT.
This commit is contained in:
parent
655bc825a1
commit
951c8f15d2
@ -82,23 +82,21 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If C++ is 2011 or higher, add 'noexcept' specifiers
|
// If C++ is 2011 or higher, add 'noexcept' specifiers
|
||||||
#ifndef PUGIXML_HAS_NOEXCEPT
|
#ifndef PUGIXML_NOEXCEPT
|
||||||
# if __cplusplus >= 201103
|
# if __cplusplus >= 201103
|
||||||
# define PUGIXML_HAS_NOEXCEPT
|
# define PUGIXML_NOEXCEPT noexcept
|
||||||
# elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026
|
# elif defined(_MSC_VER) && _MSC_VER >= 1900
|
||||||
# define PUGIXML_HAS_NOEXCEPT
|
# define PUGIXML_NOEXCEPT noexcept
|
||||||
|
# else
|
||||||
|
# define PUGIXML_NOEXCEPT
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef PUGIXML_HAS_NOEXCEPT
|
|
||||||
# define PUGIXML_NOEXCEPT noexcept
|
// Some functions can not be noexcept in compact mode
|
||||||
# ifdef PUGIXML_COMPACT
|
#ifdef PUGIXML_COMPACT
|
||||||
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
|
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
|
||||||
# else
|
|
||||||
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT noexcept
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
# define PUGIXML_NOEXCEPT
|
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT PUGIXML_NOEXCEPT
|
||||||
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If C++ is 2011 or higher, add 'override' qualifiers
|
// If C++ is 2011 or higher, add 'override' qualifiers
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user