forked from boostorg/mp11
Add test/mp_set_intersection_sf.cpp
This commit is contained in:
@ -144,7 +144,7 @@ template<class... S> struct in_all_sets
|
||||
template<class T> using fn = mp_all< mp_set_contains<S, T>... >;
|
||||
};
|
||||
|
||||
template<class L, class... S> using mp_set_intersection_ = mp_copy_if_q<L, detail::in_all_sets<S...>>;
|
||||
template<class L, class... S> using mp_set_intersection_ = mp_if< mp_all<mp_is_list<L>, mp_is_list<S>...>, mp_copy_if_q<L, detail::in_all_sets<S...>> >;
|
||||
|
||||
template<class... S> struct mp_set_intersection_impl
|
||||
{
|
||||
|
@ -138,6 +138,7 @@ run mp_set_union_sf.cpp ;
|
||||
run mp_set_difference.cpp ;
|
||||
run mp_set_difference_sf.cpp ;
|
||||
run mp_set_intersection.cpp ;
|
||||
run mp_set_intersection_sf.cpp ;
|
||||
|
||||
# function
|
||||
run mp_all.cpp ;
|
||||
|
32
test/mp_set_intersection_sf.cpp
Normal file
32
test/mp_set_intersection_sf.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
// Copyright 2019 Peter Dimov.
|
||||
//
|
||||
// Distributed under 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
|
||||
|
||||
|
||||
#include <boost/mp11/set.hpp>
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
using boost::mp11::mp_set_intersection;
|
||||
using boost::mp11::mp_valid;
|
||||
using boost::mp11::mp_list;
|
||||
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, void, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, void, void, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, void, void, void, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, void, void, void, void, void>));
|
||||
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, mp_list<>, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, mp_list<>, mp_list<>, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, mp_list<>, mp_list<>, mp_list<>, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_set_intersection, mp_list<>, mp_list<>, mp_list<>, mp_list<>, void>));
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
Reference in New Issue
Block a user