Disable is_tuple_like for msvc-12.0 and earlier

This commit is contained in:
Peter Dimov
2022-11-28 05:15:06 +02:00
parent 8761157a19
commit 1a8dca4f2c
2 changed files with 4 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
#include <boost/type_traits/integral_constant.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <utility>
namespace boost
@@ -18,7 +19,7 @@ template<class T, class E = true_type> struct is_tuple_like_: false_type
{
};
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1800)
template<class T> struct is_tuple_like_<T, integral_constant<bool, std::tuple_size<T>::value == std::tuple_size<T>::value> >: true_type
{

View File

@@ -9,6 +9,7 @@
#include <boost/container_hash/is_tuple_like.hpp>
#include <boost/core/lightweight_test_trait.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <utility>
struct X
@@ -73,7 +74,7 @@ int main()
BOOST_TEST_TRAIT_FALSE((is_tuple_like<X>));
BOOST_TEST_TRAIT_FALSE((is_tuple_like<int[2]>));
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1800)
BOOST_TEST_TRAIT_TRUE((is_tuple_like< std::pair<int, X> >));