// // Copyright 2003 © The Trustees of Indiana University. All rights // reserved. // // See the file enable_if_LICENSE for licensing conditions. // // Authors: Jaakko Järvi (jajarvi@osl.iu.edu) // Jeremiah Willcock (jewillco@osl.iu.edu) // Andrew Lumsdaine (lums@osl.iu.edu) // #include #include #include using boost::enable_if_c; using boost::disable_if_c; using boost::enable_if; using boost::disable_if; using boost::is_arithmetic; template struct tester; template struct tester::value>::type> { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct tester::value>::type> { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct tester2; template struct tester2 >::type> { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct tester2 >::type> { BOOST_STATIC_CONSTANT(bool, value = false); }; int test_main(int, char*[]) { BOOST_TEST(tester::value); BOOST_TEST(tester::value); BOOST_TEST(!tester::value); BOOST_TEST(!tester::value); BOOST_TEST(tester2::value); BOOST_TEST(tester2::value); BOOST_TEST(!tester2::value); BOOST_TEST(!tester2::value); return 0; }