// (C) Copyright John Maddock 2000. // 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.boost.org/LICENSE_1_0.txt) #ifdef TEST_STD # include #else # include #endif #include "test.hpp" #include "check_integral_constant.hpp" // // Additional tests added for VC7.1 bug, 2005/04/21 // struct marker{}; struct foo{ int x; }; template struct class_member{}; template struct class_member2 : public marker{}; TT_TEST_BEGIN(is_base_and_derived) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); #if defined(TEST_STD) && (TEST_STD < 2006) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); #else BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); #endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); typedef class_member mem_type; typedef class_member2 mem2_type; BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); TT_TEST_END