Initial move from Spirit CVS

[SVN r34896]
This commit is contained in:
Joel de Guzman
2006-08-16 16:50:52 +00:00
commit 75b9d13a88
370 changed files with 17939 additions and 0 deletions

View File

@ -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(FUSION_ACCESS_04182005_0737)
#define FUSION_ACCESS_04182005_0737
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_cv.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct ref_result
{
typedef typename add_reference<typename T::type>::type type;
};
template <typename T>
struct cref_result
{
typedef typename
add_reference<
typename add_const<typename T::type>::type
>::type
type;
};
template <typename T>
struct non_ref_parameter
{
typedef typename boost::remove_cv<T>::type const& type;
};
template <typename T>
struct call_param
{
typedef typename
mpl::eval_if<
is_reference<T>
, mpl::identity<T>
, non_ref_parameter<T>
>::type
type;
};
}}}
#endif

View File

@ -0,0 +1,48 @@
/*=============================================================================
Copyright (c) 1999-2003 Jaakko J<>rvi
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_AS_FUSION_ELEMENT_05052005_0338)
#define FUSION_AS_FUSION_ELEMENT_05052005_0338
#include <boost/ref.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct as_fusion_element
{
typedef T type;
};
template <typename T>
struct as_fusion_element<reference_wrapper<T> >
{
typedef T& type;
};
template <typename T, int N>
struct as_fusion_element<T[N]>
{
typedef const T(&type)[N];
};
template <typename T, int N>
struct as_fusion_element<volatile T[N]>
{
typedef const volatile T(&type)[N];
};
template <typename T, int N>
struct as_fusion_element<const volatile T[N]>
{
typedef const volatile T(&type)[N];
};
}}}
#endif

View File

@ -0,0 +1,20 @@
/*=============================================================================
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_CATEGORY_OF_07212005_1025)
#define FUSION_CATEGORY_OF_07212005_1025
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct fusion_category_of
{
typedef typename T::category type;
};
}}}
#endif

View File

@ -0,0 +1,18 @@
/*=============================================================================
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_COMPILER_CONFIG_01052006_1200)
#define FUSION_COMPILER_CONFIG_01052006_1200
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
#pragma warning(disable : 4512 4244 4100 4305)
#endif
#endif

View File

@ -0,0 +1,54 @@
/*=============================================================================
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)
==============================================================================*/
#if !defined(FUSION_DETAIL_IS_MPL_SEQUENCE_15122005_2137)
#define FUSION_DETAIL_IS_MPL_SEQUENCE_15122005_2137
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/int_fwd.hpp>
#include <boost/mpl/long_fwd.hpp>
#include <boost/mpl/size_t_fwd.hpp>
#include <boost/mpl/integral_c_fwd.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <cstddef>
namespace boost { namespace fusion { namespace detail
{
struct mpl_int_detect
{
template <int N>
mpl_int_detect(mpl::int_<N>) {}
template <bool B>
mpl_int_detect(mpl::bool_<B>) {}
template <typename T, T N>
mpl_int_detect(mpl::integral_c<T, N>) {}
template <long N>
mpl_int_detect(mpl::long_<N>) {}
template <std::size_t N>
mpl_int_detect(mpl::size_t<N>) {}
};
template <typename T>
struct is_mpl_sequence
: mpl::and_<
mpl::not_<is_convertible<T, mpl_int_detect> >
, mpl::not_<is_base_of<sequence_root, T> >
, mpl::is_sequence<T> >
{};
}}}
#endif

View File

@ -0,0 +1,20 @@
/*=============================================================================
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_IS_VIEW_03202006_0018)
#define FUSION_IS_VIEW_03202006_0018
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct fusion_is_view
{
typedef typename T::is_view type;
};
}}}
#endif

View File

@ -0,0 +1,62 @@
/*=============================================================================
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_ITERATOR_TO_SEQUENCE_CATEGORY_07212005_0726)
#define FUSION_ITERATOR_TO_SEQUENCE_CATEGORY_07212005_0726
namespace boost { namespace fusion
{
struct incrementable_traversal_tag;
struct single_pass_traversal_tag;
struct forward_traversal_tag;
struct bidirectional_traversal_tag;
struct random_access_traversal_tag;
struct incrementable_sequence_tag;
struct single_pass_sequence_tag;
struct forward_sequence_tag;
struct bidirectional_sequence_tag;
struct random_access_sequence_tag;
}}
namespace boost { namespace fusion { namespace detail
{
template <typename Category>
struct iterator_to_sequence_category;
template <>
struct iterator_to_sequence_category<incrementable_traversal_tag>
{
typedef incrementable_sequence_tag type;
};
template <>
struct iterator_to_sequence_category<single_pass_traversal_tag>
{
typedef single_pass_sequence_tag type;
};
template <>
struct iterator_to_sequence_category<forward_traversal_tag>
{
typedef forward_sequence_tag type;
};
template <>
struct iterator_to_sequence_category<bidirectional_traversal_tag>
{
typedef bidirectional_sequence_tag type;
};
template <>
struct iterator_to_sequence_category<random_access_traversal_tag>
{
typedef random_access_sequence_tag type;
};
}}}
#endif

View File

@ -0,0 +1,49 @@
/*=============================================================================
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_ITERATOR_CATEGORY_07212005_0923)
#define FUSION_MPL_ITERATOR_CATEGORY_07212005_0923
namespace boost { namespace mpl
{
struct forward_iterator_tag;
struct bidirectional_iterator_tag;
struct random_access_iterator_tag;
}}
namespace boost { namespace fusion
{
struct forward_traversal_tag;
struct bidirectional_traversal_tag;
struct random_access_traversal_tag;
}}
namespace boost { namespace fusion { namespace detail
{
template <typename Category>
struct mpl_iterator_category;
template <>
struct mpl_iterator_category<mpl::forward_iterator_tag>
{
typedef forward_traversal_tag type;
};
template <>
struct mpl_iterator_category<mpl::bidirectional_iterator_tag>
{
typedef bidirectional_traversal_tag type;
};
template <>
struct mpl_iterator_category<mpl::random_access_iterator_tag>
{
typedef random_access_traversal_tag type;
};
}}}
#endif

View File

@ -0,0 +1,17 @@
/*=============================================================================
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_UNKNOWN_KEY_09242005_1219)
#define FUSION_UNKNOWN_KEY_09242005_1219
namespace boost { namespace fusion { namespace detail
{
template <int index>
struct unknown_key {};
}}}
#endif