binary operators: msvc-12 and under can't cope with new gcc workarounds, so disable in that case.

This commit is contained in:
jzmaddock
2018-02-13 19:55:06 +00:00
parent 84f9b6da68
commit 875b95974a
7 changed files with 15 additions and 13 deletions

View File

@ -27,7 +27,7 @@ struct is_likely_stateless_lambda : public false_type {};
}}
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_MSVC)
#include <boost/type_traits/is_convertible.hpp>
#include <boost/core/enable_if.hpp>
@ -79,14 +79,16 @@ struct is_likely_stateless_lambda<
} /* namespace boost */
#else
//
// Can't implement this:
//
namespace boost{ namespace type_traits_detail{
template<typename T>
struct is_likely_stateless_lambda : public false_type {};
#include <boost/type_traits/is_complete.hpp>
//
// Can't implement this, but for some reason msvc detects lambda types as incomplete and we can use that here as a poor man's proxy:
//
namespace boost {
namespace type_traits_detail {
template<typename T>
struct is_likely_stateless_lambda : public boost::integral_constant<bool, !boost::is_complete<T>::value> {};
}}
#endif

View File

@ -233,7 +233,7 @@ void specific() {
(void)f;
(void)f2;
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC)
auto f = []() {};
auto f2 = [](double)->int { return 2; };
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);

View File

@ -233,7 +233,7 @@ void specific() {
(void)f;
(void)f2;
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC)
auto f = []() {};
auto f2 = [](double)->int { return 2; };
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);

View File

@ -233,7 +233,7 @@ void specific() {
(void)f;
(void)f2;
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC)
auto f = []() {};
auto f2 = [](double)->int { return 2; };
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);

View File

@ -233,7 +233,7 @@ void specific() {
(void)f;
(void)f2;
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC)
auto f = []() {};
auto f2 = [](double)->int { return 2; };
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);

View File

@ -233,7 +233,7 @@ void specific() {
(void)f;
(void)f2;
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC)
auto f = []() {};
auto f2 = [](double)->int { return 2; };
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);

View File

@ -233,7 +233,7 @@ void specific() {
(void)f;
(void)f2;
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC)
auto f = []() {};
auto f2 = [](double)->int { return 2; };
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);