forked from boostorg/type_traits
Disable additional specialization for is_function for msvc-10.0 -
it doesn't work and leads to ambiguous overloads. Also change the expected result of some tests for msvc-14.0.
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/detail/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
|
||||
# include <boost/type_traits/detail/is_function_ptr_helper.hpp>
|
||||
@ -96,8 +97,10 @@ template <class T> struct is_function : integral_constant<bool, ::boost::detail:
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T> struct is_function<T&&> : public false_type {};
|
||||
#endif
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
|
||||
template <class T> struct is_function<T&> : public false_type {};
|
||||
#endif
|
||||
#endif
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED
|
||||
|
@ -223,10 +223,15 @@ void specific() {
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 1);
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1900)
|
||||
bool result = false;
|
||||
#else
|
||||
bool result = true;
|
||||
#endif
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), result);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), result);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), result);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), result);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
|
||||
|
||||
|
Reference in New Issue
Block a user