diff --git a/include/boost/type_traits/detail/is_likely_lambda.hpp b/include/boost/type_traits/detail/is_likely_lambda.hpp index a5cc19c..11ef8ea 100644 --- a/include/boost/type_traits/detail/is_likely_lambda.hpp +++ b/include/boost/type_traits/detail/is_likely_lambda.hpp @@ -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 #include @@ -79,14 +79,16 @@ struct is_likely_stateless_lambda< } /* namespace boost */ #else -// -// Can't implement this: -// -namespace boost{ namespace type_traits_detail{ -template -struct is_likely_stateless_lambda : public false_type {}; +#include + // + // 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 + struct is_likely_stateless_lambda : public boost::integral_constant::value> {}; }} #endif diff --git a/test/has_equal_to_test.cpp b/test/has_equal_to_test.cpp index 9955bf3..b038854 100644 --- a/test/has_equal_to_test.cpp +++ b/test/has_equal_to_test.cpp @@ -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); diff --git a/test/has_greater_equal_test.cpp b/test/has_greater_equal_test.cpp index fd7a334..8d274b9 100644 --- a/test/has_greater_equal_test.cpp +++ b/test/has_greater_equal_test.cpp @@ -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); diff --git a/test/has_greater_test.cpp b/test/has_greater_test.cpp index 17a76f7..0715d31 100644 --- a/test/has_greater_test.cpp +++ b/test/has_greater_test.cpp @@ -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); diff --git a/test/has_less_equal_test.cpp b/test/has_less_equal_test.cpp index 3d57574..4e458d3 100644 --- a/test/has_less_equal_test.cpp +++ b/test/has_less_equal_test.cpp @@ -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); diff --git a/test/has_less_test.cpp b/test/has_less_test.cpp index 3358bf9..559c9ee 100644 --- a/test/has_less_test.cpp +++ b/test/has_less_test.cpp @@ -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); diff --git a/test/has_not_equal_to_test.cpp b/test/has_not_equal_to_test.cpp index c0e027a..23df3a0 100644 --- a/test/has_not_equal_to_test.cpp +++ b/test/has_not_equal_to_test.cpp @@ -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);