2 #include <gintenlib/preprocessor/enable_if.hpp>
5 #include <boost/test/minimal.hpp>
9 struct derived : base {};
12 #include <boost/type_traits/is_base_of.hpp>
14 // GINTENLIB_ENABLE_IF のチェック
15 // これさえ通れば、この内部で使われている
16 // <gintenlib/enable_if.hpp>
17 // <gintenlib/d_enable_if.hpp>
18 // <gintenlib/preprocessor/dequote.hpp>
19 // これらのチェックも自動的に通ったことになる
21 bool hoge( const T&, GINTENLIB_ENABLE_IF(( boost::is_base_of<base, T> )) )
26 bool hoge( const T&, GINTENLIB_DISABLE_IF(( boost::is_base_of<base, T> )) )
33 int test_main( int argc, char* argv[] )
38 BOOST_CHECK( hoge(d) );
39 BOOST_CHECK( !hoge(i) );