forked from boostorg/type_traits
binary operators: add revised workaounds for gcc-4.7 and 4.8
This commit is contained in:
1 parent
28658d6c11
commit
84f9b6da68
14 files changed
+155
-6
No files matched your search
@@ -222,15 +222,24 @@ void specific() {
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
TEST_TR(decltype(f2), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
TEST_TR(decltype(f2), bool, false);
|
||||
#endif
|
||||
(void)f;
|
||||
(void)f2;
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0);
|
||||
(void)f;
|
||||
(void)f2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -222,15 +222,24 @@ void specific() {
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
TEST_TR(decltype(f2), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
TEST_TR(decltype(f2), bool, false);
|
||||
#endif
|
||||
(void)f;
|
||||
(void)f2;
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0);
|
||||
(void)f;
|
||||
(void)f2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -222,15 +222,24 @@ void specific() {
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
TEST_TR(decltype(f2), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
TEST_TR(decltype(f2), bool, false);
|
||||
#endif
|
||||
(void)f;
|
||||
(void)f2;
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0);
|
||||
(void)f;
|
||||
(void)f2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -222,15 +222,24 @@ void specific() {
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
TEST_TR(decltype(f2), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
TEST_TR(decltype(f2), bool, false);
|
||||
#endif
|
||||
(void)f;
|
||||
(void)f2;
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0);
|
||||
(void)f;
|
||||
(void)f2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -222,15 +222,24 @@ void specific() {
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
TEST_TR(decltype(f2), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
TEST_TR(decltype(f2), bool, false);
|
||||
#endif
|
||||
(void)f;
|
||||
(void)f2;
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0);
|
||||
(void)f;
|
||||
(void)f2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -222,15 +222,24 @@ void specific() {
|
||||
#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
|
||||
// There are some things that pass that wouldn't otherwise do so:
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
#ifndef BOOST_MSVC
|
||||
TEST_TR(decltype(f), bool, true);
|
||||
TEST_TR(decltype(f2), bool, true);
|
||||
#else
|
||||
TEST_TR(decltype(f), bool, false);
|
||||
TEST_TR(decltype(f2), bool, false);
|
||||
#endif
|
||||
(void)f;
|
||||
(void)f2;
|
||||
|
||||
#elif !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
auto f = []() {};
|
||||
auto f2 = [](double)->int { return 2; };
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0);
|
||||
(void)f;
|
||||
(void)f2;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user