mirror of
https://github.com/boostorg/container_hash.git
synced 2025-08-05 07:24:34 +02:00
Disable is_tuple_like for msvc-12.0 and earlier
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <boost/type_traits/integral_constant.hpp>
|
#include <boost/type_traits/integral_constant.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/config/workaround.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace boost
|
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
|
template<class T> struct is_tuple_like_<T, integral_constant<bool, std::tuple_size<T>::value == std::tuple_size<T>::value> >: true_type
|
||||||
{
|
{
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#include <boost/container_hash/is_tuple_like.hpp>
|
#include <boost/container_hash/is_tuple_like.hpp>
|
||||||
#include <boost/core/lightweight_test_trait.hpp>
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/config/workaround.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
struct X
|
struct X
|
||||||
@@ -73,7 +74,7 @@ int main()
|
|||||||
BOOST_TEST_TRAIT_FALSE((is_tuple_like<X>));
|
BOOST_TEST_TRAIT_FALSE((is_tuple_like<X>));
|
||||||
BOOST_TEST_TRAIT_FALSE((is_tuple_like<int[2]>));
|
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> >));
|
BOOST_TEST_TRAIT_TRUE((is_tuple_like< std::pair<int, X> >));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user