1 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2014. 2 // Distributed under the Boost Software License, Version 1.0. 3 // (See accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 6 #include <boost/metaparse/v1/impl/has_type.hpp> 7 8 #include <boost/mpl/assert.hpp> 9 #include <boost/mpl/not.hpp> 10 11 #include "test_case.hpp" 12 13 namespace 14 { 15 struct nullary_metafunction 16 { 17 typedef int type; 18 }; 19 } 20 BOOST_METAPARSE_TEST_CASE(has_type)21BOOST_METAPARSE_TEST_CASE(has_type) 22 { 23 using boost::metaparse::v1::impl::has_type; 24 using boost::mpl::not_; 25 26 // test_int_has_no_type 27 BOOST_MPL_ASSERT((not_<has_type<int>::type>)); 28 29 // test_nullary_metafunction_has_type 30 BOOST_MPL_ASSERT((has_type<nullary_metafunction>)); 31 } 32 33