From 147abb8cddee1acc2ada4c162b309857764ff043 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Sun, 17 Sep 2006 13:05:25 +0000 Subject: [PATCH] Tweaks and addition of main header mpl.hpp to make using MPL and Fusion easy [SVN r35142] --- .../fusion/iterator/mpl/fusion_iterator.hpp | 2 ++ include/boost/fusion/mpl.hpp | 16 ++++++++++++++++ .../support/detail/mpl_iterator_category.hpp | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 include/boost/fusion/mpl.hpp diff --git a/include/boost/fusion/iterator/mpl/fusion_iterator.hpp b/include/boost/fusion/iterator/mpl/fusion_iterator.hpp index 5c655d47..253d35bc 100644 --- a/include/boost/fusion/iterator/mpl/fusion_iterator.hpp +++ b/include/boost/fusion/iterator/mpl/fusion_iterator.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -23,6 +24,7 @@ namespace boost { namespace mpl struct fusion_iterator { typedef typename fusion::result_of::value_of::type type; + typedef typename fusion::traits::category_of::type category; typedef Iterator iterator; }; diff --git a/include/boost/fusion/mpl.hpp b/include/boost/fusion/mpl.hpp new file mode 100644 index 00000000..3cf71d2a --- /dev/null +++ b/include/boost/fusion/mpl.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + 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_MPL_09172006_2049) +#define FUSION_MPL_09172006_2049 + +// The fusion <--> MPL link headers +#include +#include +#include + +#endif diff --git a/include/boost/fusion/support/detail/mpl_iterator_category.hpp b/include/boost/fusion/support/detail/mpl_iterator_category.hpp index 0a9a8d27..771c08a8 100644 --- a/include/boost/fusion/support/detail/mpl_iterator_category.hpp +++ b/include/boost/fusion/support/detail/mpl_iterator_category.hpp @@ -44,6 +44,24 @@ namespace boost { namespace fusion { namespace detail { typedef random_access_traversal_tag type; }; + + template <> + struct mpl_iterator_category + { + typedef forward_traversal_tag type; + }; + + template <> + struct mpl_iterator_category + { + typedef bidirectional_traversal_tag type; + }; + + template <> + struct mpl_iterator_category + { + typedef random_access_traversal_tag type; + }; }}} #endif