// Copyright Peter Dimov 2015 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) #ifdef TEST_STD # include #else # include # include #endif #include "test.hpp" #include "check_integral_constant.hpp" #include typedef char(&s1)[1]; typedef char(&s2)[2]; template s1 has_type_impl( typename T::type * ); template s2 has_type_impl( ... ); template struct has_type: tt::integral_constant(0)) == sizeof(s1)> {}; struct X {}; struct Y {}; TT_TEST_BEGIN(common_type_sfinae2) { #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type >::value), false ); BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type >::value), false ); BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type >::value), false ); BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type >::value), false ); #endif } TT_TEST_END