diff --git a/doc/mp11/algorithm.adoc b/doc/mp11/algorithm.adoc index 9edba6f..ab7b793 100644 --- a/doc/mp11/algorithm.adoc +++ b/doc/mp11/algorithm.adoc @@ -767,8 +767,8 @@ As `mp_pairwise_fold`, but takes a quoted metafunction. .Using mp_pairwise_fold_q ---- -template using is_nondecreasing = mp_none_of< - mp_pairwise_fold_q>, mp_to_bool>; +template class P> using is_sorted = + mp_none_of>, mp_to_bool>; ---- ## mp_iterate diff --git a/test/mp_pairwise_fold_q.cpp b/test/mp_pairwise_fold_q.cpp index 15e1b11..b7e995a 100644 --- a/test/mp_pairwise_fold_q.cpp +++ b/test/mp_pairwise_fold_q.cpp @@ -7,12 +7,12 @@ using namespace boost::mp11; -template using is_sorted = mp_none_of>, mp_to_bool>; +template class P> using is_sorted = mp_none_of>, mp_to_bool>; int main() { - BOOST_TEST_TRAIT_TRUE((is_sorted, mp_int<0>, mp_int<1>, mp_int<3>, mp_int<3>, mp_int<7>>>)); - BOOST_TEST_TRAIT_FALSE((is_sorted, mp_int<0>, mp_int<1>, mp_int<3>, mp_int<3>, mp_int<2>>>)); + BOOST_TEST_TRAIT_TRUE((is_sorted, mp_int<0>, mp_int<1>, mp_int<3>, mp_int<3>, mp_int<7>>, mp_less>)); + BOOST_TEST_TRAIT_FALSE((is_sorted, mp_int<0>, mp_int<1>, mp_int<3>, mp_int<3>, mp_int<2>>, mp_less>)); return boost::report_errors(); }