// Copyright Daniel Wallin 2006. Use, modification and distribution is // 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) #ifndef BOOST_DEDUCED_060920_HPP # define BOOST_DEDUCED_060920_HPP # include # include "basics.hpp" struct not_present_tag {}; not_present_tag not_present; template struct assert_expected { assert_expected(E const& e, ArgPack const& args) : expected(e) , args(args) {} template bool check_not_present(T const&) const { BOOST_MPL_ASSERT((boost::is_same)); return true; } template bool check1(K const& k, not_present_tag const&, long) const { return check_not_present(args[k | not_present]); } template bool check1(K const& k, Expected const& expected, int) const { return test::equal(args[k], expected); } template void operator()(K) const { boost::parameter::keyword const& k = boost::parameter::keyword::get(); assert(check1(k, expected[k], 0L)); } E const& expected; ArgPack const& args; }; template void check0(E const& e, ArgPack const& args) { boost::mpl::for_each(assert_expected(e, args)); } template void check(E const& e, A0 const& a0) { check0(e, P()(a0)); } template void check(E const& e, A0 const& a0, A1 const& a1) { check0(e, P()(a0,a1)); } template void check(E const& e, A0 const& a0, A1 const& a1, A2 const& a2) { check0(e, P()(a0,a1,a2)); } #endif // BOOST_DEDUCED_060920_HPP