From 7d89ec042640bb862ae7ec7743a0880620c7980d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 21 Mar 2019 10:23:21 +0000 Subject: [PATCH] Fix use of noexcept for msvc with /Zc:noexceptTypes- flag set. Fixes https://github.com/boostorg/type_traits/issues/118. --- include/boost/type_traits/detail/config.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 00970f2..fe7596a 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -93,6 +93,13 @@ # define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM # 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 +// 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 #endif // BOOST_TT_CONFIG_HPP_INCLUDED