/*============================================================================= Copyright (c) 2001-2006 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden 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) ==============================================================================*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main() { namespace fusion = boost::fusion; typedef boost::variant var_type; var_type var = "hello"; BOOST_TEST(fusion::size(var) == 2); BOOST_TEST(fusion::distance(fusion::begin(var), fusion::end(var)) == 2); BOOST_TEST(*fusion::next(fusion::begin(var)) == "hello"); BOOST_TEST(fusion::next(fusion::next(fusion::begin(var))) == fusion::end(var)); BOOST_MPL_ASSERT((boost::is_same< fusion::result_of::value_of::type>::type, double>)); BOOST_MPL_ASSERT((boost::is_same< fusion::result_of::value_of::type>::type>::type, std::string>)); return boost::report_errors(); }