/*============================================================================= 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 #include struct X { operator int() const { return 12345; } }; int main() { using namespace boost::fusion; { using boost::is_same; using boost::mpl::_; typedef vector vector_type; vector_type v(12345, 'x', 678910, 3.36); std::cout << *find_if >(v) << std::endl; BOOST_TEST((*find_if >(v) == 'x')); std::cout << *find_if >(v) << std::endl; BOOST_TEST((*find_if >(v) == 12345)); std::cout << *find_if >(v) << std::endl; BOOST_TEST((*find_if >(v) == 3.36)); } { using boost::mpl::vector; using boost::is_same; using boost::mpl::_; typedef vector mpl_vec; BOOST_TEST((*find_if >(mpl_vec()) == 12345)); } { using boost::mpl::vector_c; using boost::mpl::less; using boost::mpl::int_; using boost::is_same; using boost::mpl::_; typedef vector_c mpl_vec; BOOST_TEST((*find_if > >(mpl_vec()) == 1)); } return boost::report_errors(); }