diff --git a/include/boost/fusion/sequence/adapted.hpp b/include/boost/fusion/sequence/adapted.hpp index c7181e0d..b9f6ca3c 100644 --- a/include/boost/fusion/sequence/adapted.hpp +++ b/include/boost/fusion/sequence/adapted.hpp @@ -9,6 +9,7 @@ #if !defined(BOOST_FUSION_ADAPTED_30122005_1420) #define BOOST_FUSION_ADAPTED_30122005_1420 +#include #include #include #include diff --git a/include/boost/fusion/sequence/adapted/boost_tuple.hpp b/include/boost/fusion/sequence/adapted/boost_tuple.hpp new file mode 100644 index 00000000..d6e5b1b2 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple.hpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_BOOST_TUPLE_09272006_0732) +#define BOOST_FUSION_BOOST_TUPLE_09272006_0732 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/boost_tuple_iterator.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/boost_tuple_iterator.hpp new file mode 100644 index 00000000..d8cc5fb7 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/boost_tuple_iterator.hpp @@ -0,0 +1,113 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(FUSION_BOOST_TUPLE_ITERATOR_09262006_1851) +#define FUSION_BOOST_TUPLE_ITERATOR_09262006_1851 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct forward_traversal_tag; + + template + struct boost_tuple_iterator + : iterator_facade, forward_traversal_tag> + { + typedef Cons cons_type; + + explicit boost_tuple_iterator(Cons& cons) + : cons(cons) {} + Cons& cons; + + template + struct value_of : mpl::identity {}; + + template + struct deref + { + typedef typename value_of::type element; + + typedef typename + mpl::if_< + is_const + , typename tuples::access_traits::const_type + , typename tuples::access_traits::non_const_type + >::type + type; + + static type + call(Iterator const& iter) + { + return iter.cons.get_head(); + } + }; + + template + struct next + { + typedef typename Iterator::cons_type cons_type; + typedef typename cons_type::tail_type tail_type; + + typedef boost_tuple_iterator< + typename mpl::eval_if< + is_const + , add_const + , mpl::identity + >::type> + type; + + static type + call(Iterator const& iter) + { + return type(iter.cons.get_tail()); + } + }; + }; + + template <> + struct boost_tuple_iterator + : iterator_facade, forward_traversal_tag> + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; + + template <> + struct boost_tuple_iterator + : iterator_facade, forward_traversal_tag> + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; + + template <> + struct boost_tuple_iterator > + : iterator_facade >, forward_traversal_tag> + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; + + template <> + struct boost_tuple_iterator const> + : iterator_facade const>, forward_traversal_tag> + { + template + explicit boost_tuple_iterator(Cons const&) {} + }; +}} + +#endif + + diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/at_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/at_impl.hpp new file mode 100644 index 00000000..7ed9c945 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/at_impl.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_AT_IMPL_09262006_1920) +#define BOOST_FUSION_AT_IMPL_09262006_1920 + +#include +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef typename + tuples::element::type + element; + + typedef typename + mpl::if_< + is_const + , typename tuples::access_traits::const_type + , typename tuples::access_traits::non_const_type + >::type + type; + + static type + call(Sequence& seq) + { + return tuples::get(seq); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/begin_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/begin_impl.hpp new file mode 100644 index 00000000..699eabac --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/begin_impl.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_BEGIN_IMPL_09272006_0719) +#define BOOST_FUSION_BEGIN_IMPL_09272006_0719 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef boost_tuple_iterator type; + + static type + call(Sequence& v) + { + return type(v); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/category_of_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/category_of_impl.hpp new file mode 100644 index 00000000..677e1825 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/category_of_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726) +#define BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726 + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + struct forward_traversal_tag; + + namespace extension + { + template + struct category_of_impl; + + template<> + struct category_of_impl + { + template + struct apply + { + typedef forward_traversal_tag type; + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/end_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/end_impl.hpp new file mode 100644 index 00000000..95e81e80 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/end_impl.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_END_IMPL_09272006_0721) +#define BOOST_FUSION_END_IMPL_09272006_0721 + +#include +#include +#include + +namespace boost { namespace tuples +{ + struct null_type; +}} + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct end_impl; + + template <> + struct end_impl + { + template + struct apply + { + typedef + boost_tuple_iterator< + typename mpl::if_< + is_const + , tuples::null_type const + , tuples::null_type + >::type + > + type; + + static type + call(Sequence& seq) + { + return type(seq); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/is_sequence_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/is_sequence_impl.hpp new file mode 100644 index 00000000..69266b11 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/is_sequence_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_09272006_0726) +#define BOOST_FUSION_IS_SEQUENCE_IMPL_09272006_0726 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply : mpl::true_ {}; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/is_view_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/is_view_impl.hpp new file mode 100644 index 00000000..2e394f84 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/is_view_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_IS_VIEW_IMPL_09272006_0725) +#define BOOST_FUSION_IS_VIEW_IMPL_09272006_0725 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct is_view_impl; + + template<> + struct is_view_impl + { + template + struct apply : mpl::false_ {}; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/size_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/size_impl.hpp new file mode 100644 index 00000000..0723d6f4 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/size_impl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_SIZE_IMPL_09272006_0724) +#define BOOST_FUSION_SIZE_IMPL_09272006_0724 + +#include +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct size_impl; + + template <> + struct size_impl + { + template + struct apply : mpl::int_::value> {}; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/detail/value_at_impl.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/detail/value_at_impl.hpp new file mode 100644 index 00000000..7ee6bd69 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/detail/value_at_impl.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_VALUE_AT_IMPL_09262006_1926) +#define BOOST_FUSION_VALUE_AT_IMPL_09262006_1926 + +#include + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply : tuples::element {}; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/adapted/boost_tuple/tag_of.hpp b/include/boost/fusion/sequence/adapted/boost_tuple/tag_of.hpp new file mode 100644 index 00000000..37e16807 --- /dev/null +++ b/include/boost/fusion/sequence/adapted/boost_tuple/tag_of.hpp @@ -0,0 +1,56 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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) +==============================================================================*/ +#if !defined(BOOST_FUSION_TAG_OF_09262006_1900) +#define BOOST_FUSION_TAG_OF_09262006_1900 + +#include + +namespace boost { namespace tuples +{ + struct null_type; + + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + class tuple; + + template + struct cons; +}} + +namespace boost { namespace fusion +{ + struct boost_tuple_tag; + + namespace traits + { + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + struct tag_of > + { + typedef boost_tuple_tag type; + }; + + template + struct tag_of > + { + typedef boost_tuple_tag type; + }; + + template <> + struct tag_of + { + typedef boost_tuple_tag type; + }; + } +}} + +#endif diff --git a/include/boost/fusion/sequence/container/list/cons.hpp b/include/boost/fusion/sequence/container/list/cons.hpp index 3b5e7131..41196974 100644 --- a/include/boost/fusion/sequence/container/list/cons.hpp +++ b/include/boost/fusion/sequence/container/list/cons.hpp @@ -87,16 +87,12 @@ namespace boost { namespace fusion template explicit cons( Sequence const& seq -//~ #if defined(BOOST_MSVC) -// VC++ gets confused when RHS is a derived type. It fails to call -// the copy ctor and attempts to call this templated constructor instead. , typename disable_if< mpl::or_< is_convertible // use copy ctor instead , is_convertible // use copy to car instead > >::type* dummy = 0 -//~ #endif ) : car(*fusion::begin(seq)) , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {} diff --git a/include/boost/fusion/sequence/intrinsic/at.hpp b/include/boost/fusion/sequence/intrinsic/at.hpp index ec3a1fdc..029135db 100644 --- a/include/boost/fusion/sequence/intrinsic/at.hpp +++ b/include/boost/fusion/sequence/intrinsic/at.hpp @@ -17,6 +17,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -37,6 +38,9 @@ namespace boost { namespace fusion struct apply : Sequence::template at {}; }; + template <> + struct at_impl; + template <> struct at_impl; diff --git a/include/boost/fusion/sequence/intrinsic/begin.hpp b/include/boost/fusion/sequence/intrinsic/begin.hpp index c6b053fa..2c60008d 100644 --- a/include/boost/fusion/sequence/intrinsic/begin.hpp +++ b/include/boost/fusion/sequence/intrinsic/begin.hpp @@ -14,6 +14,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; // iterator facade tag + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -34,6 +35,9 @@ namespace boost { namespace fusion struct apply : Sequence::template begin {}; }; + template <> + struct begin_impl; + template <> struct begin_impl; diff --git a/include/boost/fusion/sequence/intrinsic/end.hpp b/include/boost/fusion/sequence/intrinsic/end.hpp index 47ea2479..0194e53e 100644 --- a/include/boost/fusion/sequence/intrinsic/end.hpp +++ b/include/boost/fusion/sequence/intrinsic/end.hpp @@ -14,6 +14,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -34,6 +35,9 @@ namespace boost { namespace fusion struct apply : Sequence::template end {}; }; + template <> + struct end_impl; + template <> struct end_impl; diff --git a/include/boost/fusion/sequence/intrinsic/size.hpp b/include/boost/fusion/sequence/intrinsic/size.hpp index 9b3f9a7b..231e2f74 100644 --- a/include/boost/fusion/sequence/intrinsic/size.hpp +++ b/include/boost/fusion/sequence/intrinsic/size.hpp @@ -15,6 +15,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -35,6 +36,9 @@ namespace boost { namespace fusion struct apply : Sequence::template size {}; }; + template <> + struct size_impl; + template <> struct size_impl; diff --git a/include/boost/fusion/sequence/intrinsic/value_at.hpp b/include/boost/fusion/sequence/intrinsic/value_at.hpp index f8fcd0b2..bc73a162 100644 --- a/include/boost/fusion/sequence/intrinsic/value_at.hpp +++ b/include/boost/fusion/sequence/intrinsic/value_at.hpp @@ -15,6 +15,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -35,6 +36,9 @@ namespace boost { namespace fusion struct apply : Sequence::template value_at {}; }; + template <> + struct value_at_impl; + template <> struct value_at_impl; diff --git a/include/boost/fusion/support/category_of.hpp b/include/boost/fusion/support/category_of.hpp index fa8f795f..c22ac8c3 100644 --- a/include/boost/fusion/support/category_of.hpp +++ b/include/boost/fusion/support/category_of.hpp @@ -15,6 +15,7 @@ namespace boost { namespace fusion { // Special tags: + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -44,6 +45,9 @@ namespace boost { namespace fusion struct apply : detail::fusion_category_of {}; }; + template <> + struct category_of_impl; + template <> struct category_of_impl; diff --git a/include/boost/fusion/support/is_sequence.hpp b/include/boost/fusion/support/is_sequence.hpp index 5de2e94c..b13af130 100644 --- a/include/boost/fusion/support/is_sequence.hpp +++ b/include/boost/fusion/support/is_sequence.hpp @@ -19,6 +19,7 @@ namespace boost { namespace fusion { // Special tags: struct non_fusion_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -39,6 +40,9 @@ namespace boost { namespace fusion struct apply : mpl::false_ {}; }; + template <> + struct is_sequence_impl; + template <> struct is_sequence_impl; diff --git a/include/boost/fusion/support/is_view.hpp b/include/boost/fusion/support/is_view.hpp index 4db7883e..12818319 100644 --- a/include/boost/fusion/support/is_view.hpp +++ b/include/boost/fusion/support/is_view.hpp @@ -15,6 +15,7 @@ namespace boost { namespace fusion { // Special tags: struct sequence_facade_tag; + struct boost_tuple_tag; // boost::tuples::tuple tag struct array_tag; // boost::array tag struct mpl_sequence_tag; // mpl sequence tag struct std_pair_tag; // std::pair tag @@ -37,6 +38,9 @@ namespace boost { namespace fusion struct apply : Sequence::is_view {}; }; + template <> + struct is_view_impl; + template <> struct is_view_impl; diff --git a/include/boost/fusion/support/tag_of.hpp b/include/boost/fusion/support/tag_of.hpp index cf5b9a32..33a954c0 100644 --- a/include/boost/fusion/support/tag_of.hpp +++ b/include/boost/fusion/support/tag_of.hpp @@ -20,6 +20,20 @@ namespace boost { template class array; // forward + + namespace tuples + { + struct null_type; + + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + class tuple; + + template + struct cons; + } } namespace boost { namespace fusion @@ -45,6 +59,18 @@ namespace boost { namespace fusion typedef typename Sequence::fusion_tag type; }; + template < + class T0, class T1, class T2, class T3, class T4, + class T5, class T6, class T7, class T8, class T9 + > + struct tag_of >; + + template + struct tag_of >; + + template <> + struct tag_of; + template struct tag_of >; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 437efad6..4b645a16 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -45,6 +45,7 @@ import testing ; [ run sequence/as_map.cpp : : : : ] [ run sequence/as_set.cpp : : : : ] [ run sequence/as_vector.cpp : : : : ] + [ run sequence/boost_tuple.cpp : : : : ] [ run sequence/cons.cpp : : : : ] [ run sequence/filter_view.cpp : : : : ] [ run sequence/io.cpp : : : : ] diff --git a/test/sequence/boost_tuple.cpp b/test/sequence/boost_tuple.cpp new file mode 100644 index 00000000..9fc93985 --- /dev/null +++ b/test/sequence/boost_tuple.cpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + using namespace std; + + std::cout << tuple_open('['); + std::cout << tuple_close(']'); + std::cout << tuple_delimiter(", "); + + { + typedef boost::tuple tuple_type; + BOOST_MPL_ASSERT_NOT((traits::is_view)); + tuple_type t(123, "Hola!!!"); + + std::cout << at_c<0>(t) << std::endl; + std::cout << at_c<1>(t) << std::endl; + std::cout << t << std::endl; + BOOST_TEST(t == make_vector(123, "Hola!!!")); + + at_c<0>(t) = 6; + at_c<1>(t) = "mama mia"; + BOOST_TEST(t == make_vector(6, "mama mia")); + + BOOST_STATIC_ASSERT(result_of::size::value == 2); + BOOST_STATIC_ASSERT(!result_of::empty::value); + + BOOST_TEST(front(t) == 6); + } + + { + fusion::vector v1(4, 3.3f); + boost::tuple v2(5, 3.3f); + fusion::vector v3(5, 4.4); + BOOST_TEST(v1 < v2); + BOOST_TEST(v1 <= v2); + BOOST_TEST(v2 > v1); + BOOST_TEST(v2 >= v1); + BOOST_TEST(v2 < v3); + BOOST_TEST(v2 <= v3); + BOOST_TEST(v3 > v2); + BOOST_TEST(v3 >= v2); + } + + { + // conversion from boost tuple to vector + fusion::vector v(tuples::make_tuple(123, "Hola!!!")); + v = tuples::make_tuple(123, "Hola!!!"); + } + + { + // conversion from boost tuple to list + fusion::list l(tuples::make_tuple(123, "Hola!!!")); + l = tuples::make_tuple(123, "Hola!!!"); + } + + return boost::report_errors(); +} +