/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman 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 #include #include #include #include #include #include #include struct X { operator char const*() const { return ""; } }; struct Y { operator char const*() const { return ""; } }; int main() { using namespace boost::fusion; using boost::mpl::identity; using boost::mpl::vector; namespace fusion = boost::fusion; std::cout << tuple_open('['); std::cout << tuple_close(']'); std::cout << tuple_delimiter(", "); /// Testing remove X x; Y y; typedef fusion::vector vector_type; vector_type t(y, '@', 987654, x, true, 6.6); { std::cout << fusion::remove(t) << std::endl; BOOST_TEST((fusion::remove(t) == make_vector(y, '@', 987654, true, 6.6))); } { std::cout << fusion::remove(t) << std::endl; BOOST_TEST((fusion::remove(t) == make_vector('@', 987654, x, true, 6.6))); } { std::cout << fusion::remove(t) << std::endl; BOOST_TEST((fusion::remove(t) == make_vector(y, '@', x, true, 6.6))); } { typedef vector mpl_vec; BOOST_TEST((fusion::remove(mpl_vec()) == vector())); BOOST_TEST((fusion::remove(mpl_vec()) == vector())); BOOST_TEST((fusion::remove(mpl_vec()) == vector())); } return boost::report_errors(); }