forked from boostorg/type_traits
Add support for noexcept detection via _NOEXCEPT_TYPES_SUPPORTED with msvc.
See https://github.com/boostorg/type_traits/issues/118#issuecomment-475228526
This commit is contained in:
@ -94,12 +94,19 @@
|
||||
# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE
|
||||
#endif
|
||||
//
|
||||
// If we have the SD6 macros (check for __cpp_rvalue_references succeeds), and we don't have __cpp_noexcept_function_type
|
||||
// If we have the SD6 macros (check for C++11's __cpp_rvalue_references), and we don't have __cpp_noexcept_function_type
|
||||
// set, then don't treat noexcept functions as seperate types. This is a fix for msvc with the /Zc:noexceptTypes- flag set.
|
||||
//
|
||||
#if defined(__cpp_rvalue_references) && !defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE)
|
||||
# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE
|
||||
#endif
|
||||
//
|
||||
// Check MSVC specific macro on older msvc compilers that don't support the SD6 macros, we don't rely on this
|
||||
// if the SD6 macros *are* available as it appears to be undocumented.
|
||||
//
|
||||
#if defined(BOOST_MSVC) && !defined(__cpp_rvalue_references) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(_NOEXCEPT_TYPES_SUPPORTED)
|
||||
# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE
|
||||
#endif
|
||||
|
||||
#endif // BOOST_TT_CONFIG_HPP_INCLUDED
|
||||
|
||||
|
Reference in New Issue
Block a user