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,46 @@
/*=============================================================================
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_ADVANCE_IMPL_09232005_2324)
#define FUSION_ADVANCE_IMPL_09232005_2324
#include <boost/mpl/advance.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
template <typename Iterator>
struct mpl_iterator;
namespace extension
{
template <typename Tag>
struct advance_impl;
template <>
struct advance_impl<mpl_iterator_tag>
{
template <typename Iterator, typename N>
struct apply
{
typedef mpl_iterator<
typename mpl::advance<typename Iterator::iterator_type, N>::type>
type;
static type
call(Iterator const& i)
{
static type result;
return result;
}
};
};
}
}}
#endif

View File

@ -0,0 +1,41 @@
/*=============================================================================
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(BOOST_FUSION_AT_IMPL_31122005_1642)
#define BOOST_FUSION_AT_IMPL_31122005_1642
#include <boost/mpl/at.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template<typename Tag>
struct at_impl;
template <>
struct at_impl<mpl_sequence_tag>
{
template <typename Sequence, typename N>
struct apply
{
typedef typename mpl::at<Sequence, N>::type type;
static type
call(Sequence)
{
return type();
}
};
};
}
}}
#endif

View File

@ -0,0 +1,46 @@
/*=============================================================================
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(BOOST_FUSION_BEGIN_IMPL_31122005_1209)
#define BOOST_FUSION_BEGIN_IMPL_31122005_1209
#include <boost/fusion/sequence/adapted/mpl/mpl_iterator.hpp>
#include <boost/mpl/begin.hpp>
#include <boost/type_traits/remove_const.hpp>
namespace boost { namespace fusion {
struct mpl_sequence_tag;
namespace extension
{
template <typename Tag>
struct begin_impl;
template <>
struct begin_impl<mpl_sequence_tag>
{
template <typename Sequence>
struct apply
{
typedef typename mpl::begin<
typename remove_const<Sequence>::type
>::type iterator;
typedef mpl_iterator<iterator> type;
static type
call(Sequence)
{
return type();
}
};
};
}
}}
#endif

View File

@ -0,0 +1,58 @@
/*=============================================================================
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(BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141)
#define BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141
#include <boost/fusion/support/detail/iterator_to_sequence_category.hpp>
#include <boost/fusion/support/detail/mpl_iterator_category.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/is_sequence.hpp>
#include <boost/static_assert.hpp>
namespace boost { namespace fusion {
namespace detail
{
template <typename T>
struct mpl_sequence_category_of
{
// assumes T is an mpl sequence
// there should be no way this will ever be
// called where T is an mpl iterator
BOOST_STATIC_ASSERT(mpl::is_sequence<T>::value);
typedef typename
iterator_to_sequence_category<
typename mpl_iterator_category<
typename mpl::begin<T>::type::category
>::type
>::type
type;
};
}
struct mpl_sequence_tag;
namespace extension
{
template<typename Tag>
struct category_of_impl;
template<>
struct category_of_impl<mpl_sequence_tag>
{
template<typename T>
struct apply
: detail::mpl_sequence_category_of<T>
{};
};
}
}}
#endif

View File

@ -0,0 +1,44 @@
/*=============================================================================
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_DEREF_IMPL_05052005_0733)
#define FUSION_DEREF_IMPL_05052005_0733
#include <boost/mpl/deref.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
namespace extension
{
template <typename Tag>
struct deref_impl;
template <>
struct deref_impl<mpl_iterator_tag>
{
template <typename Iterator>
struct apply
{
typedef typename mpl::deref<
typename Iterator::iterator_type>::type
type;
static type
call(Iterator)
{
return type();
}
};
};
}
}}
#endif

View File

@ -0,0 +1,48 @@
/*=============================================================================
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_DISTANCE_IMPL_09232005_2303)
#define FUSION_DISTANCE_IMPL_09232005_2303
#include <boost/mpl/minus.hpp>
#include <boost/mpl/distance.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
namespace extension
{
template <typename Tag>
struct distance_impl;
template <>
struct distance_impl<mpl_iterator_tag>
{
template <typename First, typename Last>
struct apply
: mpl::distance<
typename First::iterator_type
, typename Last::iterator_type>
{
static typename mpl::distance<
typename First::iterator_type
, typename Last::iterator_type>::type
call(First const&, Last const&)
{
static typename mpl::distance<
typename First::iterator_type
, typename Last::iterator_type>::type
result;
return result;
}
};
};
}
}}
#endif

View File

@ -0,0 +1,29 @@
/*=============================================================================
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(BOOST_FUSION_EMPTY_IMPL_31122005_1554)
#define BOOST_FUSION_EMPTY_IMPL_31122005_1554
#include <boost/mpl/empty.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template <>
struct empty_impl<mpl_sequence_tag>
{
template <typename Sequence>
struct apply : mpl::empty<Sequence> {};
};
}
}}
#endif

View File

@ -0,0 +1,46 @@
/*=============================================================================
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(BOOST_FUSION_END_IMPL_31122005_1237)
#define BOOST_FUSION_END_IMPL_31122005_1237
#include <boost/fusion/sequence/adapted/mpl/mpl_iterator.hpp>
#include <boost/mpl/end.hpp>
#include <boost/type_traits/add_const.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template <typename Tag>
struct end_impl;
template <>
struct end_impl<mpl_sequence_tag>
{
template <typename Sequence>
struct apply
{
typedef typename mpl::end<
typename remove_const<Sequence>::type
>::type iterator;
typedef mpl_iterator<iterator> type;
static type
call(Sequence)
{
return type();
}
};
};
}
}}
#endif

View File

@ -0,0 +1,41 @@
/*=============================================================================
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_EQUAL_TO_IMPL_05232005_0621)
#define FUSION_EQUAL_TO_IMPL_05232005_0621
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/and.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
namespace extension
{
template <typename Tag>
struct equal_to_impl;
template <>
struct equal_to_impl<mpl_iterator_tag>
{
template <typename I1, typename I2>
struct apply
: is_same<
typename remove_const<typename I1::iterator_type>::type
, typename remove_const<typename I2::iterator_type>::type
>
{
};
};
}
}}
#endif

View File

@ -0,0 +1,32 @@
/*=============================================================================
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(BOOST_FUSION_HAS_KEY_IMPL_31122005_1647)
#define BOOST_FUSION_HAS_KEY_IMPL_31122005_1647
#include <boost/mpl/has_key.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template <typename Tag>
struct has_key_impl;
template <>
struct has_key_impl<mpl_sequence_tag>
{
template <typename Sequence, typename Key>
struct apply : mpl::has_key<Sequence, Key> {};
};
}
}}
#endif

View File

@ -0,0 +1,32 @@
/*=============================================================================
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(BOOST_FUSION_IS_SEQUENCE_IMPL_31122005_1505)
#define BOOST_FUSION_IS_SEQUENCE_IMPL_31122005_1505
#include <boost/mpl/bool.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template<typename Tag>
struct is_sequence_impl;
template<>
struct is_sequence_impl<mpl_sequence_tag>
{
template<typename T>
struct apply : mpl::true_ {};
};
}
}}
#endif

View File

@ -0,0 +1,33 @@
/*=============================================================================
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(BOOST_FUSION_IS_VIEW_IMPL_03202006_0048)
#define BOOST_FUSION_IS_VIEW_IMPL_03202006_0048
#include <boost/mpl/bool.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template<typename Tag>
struct is_view_impl;
template<>
struct is_view_impl<mpl_sequence_tag>
{
template<typename T>
struct apply : mpl::true_
{};
};
}
}}
#endif

View File

@ -0,0 +1,47 @@
/*=============================================================================
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_NEXT_IMPL_05052005_0733)
#define FUSION_NEXT_IMPL_05052005_0733
#include <boost/mpl/next.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
template <typename Iterator>
struct mpl_iterator;
namespace extension
{
template <typename Tag>
struct next_impl;
template <>
struct next_impl<mpl_iterator_tag>
{
template <typename Iterator>
struct apply
{
typedef mpl_iterator<
typename mpl::next<typename Iterator::iterator_type>::type
> type;
static type
call(Iterator)
{
return type();
}
};
};
}
}}
#endif

View File

@ -0,0 +1,48 @@
/*=============================================================================
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_PRIOR_IMPL_05202005_0930)
#define FUSION_PRIOR_IMPL_05202005_0930
#include <boost/mpl/next.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
template <typename Iterator>
struct mpl_iterator;
namespace extension
{
template <typename Tag>
struct prior_impl;
template <>
struct prior_impl<mpl_iterator_tag>
{
template <typename Iterator>
struct apply
{
typedef mpl_iterator<
typename mpl::prior<typename Iterator::iterator_type>::type
> type;
static type
call(Iterator)
{
static type result;
return result;
}
};
};
}
}}
#endif

View File

@ -0,0 +1,32 @@
/*=============================================================================
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(BOOST_FUSION_SIZE_IMPL_31122005_1508)
#define BOOST_FUSION_SIZE_IMPL_31122005_1508
#include <boost/mpl/size.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template<typename Tag>
struct size_impl;
template <>
struct size_impl<mpl_sequence_tag>
{
template <typename Sequence>
struct apply : mpl::size<Sequence> {};
};
}
}}
#endif

View File

@ -0,0 +1,32 @@
/*=============================================================================
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(BOOST_FUSION_VALUE_AT_IMPL_31122005_1621)
#define BOOST_FUSION_VALUE_AT_IMPL_31122005_1621
#include <boost/mpl/at.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace extension
{
template <typename Tag>
struct value_at_impl;
template <>
struct value_at_impl<mpl_sequence_tag>
{
template <typename Sequence, typename N>
struct apply : mpl::at<Sequence, N> {};
};
}
}}
#endif

View File

@ -0,0 +1,38 @@
/*=============================================================================
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_VALUE_OF_TRAITS_05052005_0734)
#define FUSION_VALUE_OF_TRAITS_05052005_0734
#include <boost/mpl/deref.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
namespace extension
{
template <typename Tag>
struct value_of_impl;
template <>
struct value_of_impl<mpl_iterator_tag>
{
template <typename Iterator>
struct apply
{
typedef typename mpl::deref<
typename Iterator::iterator_type>::type
type;
};
};
}
}}
#endif

View File

@ -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(FUSION_MPL_ITERATOR_05052005_0731)
#define FUSION_MPL_ITERATOR_05052005_0731
#include <boost/fusion/support/iterator_base.hpp>
#include <boost/fusion/support/detail/mpl_iterator_category.hpp>
#include <boost/fusion/sequence/adapted/mpl/detail/deref_impl.hpp>
#include <boost/fusion/sequence/adapted/mpl/detail/next_impl.hpp>
#include <boost/fusion/sequence/adapted/mpl/detail/prior_impl.hpp>
#include <boost/fusion/sequence/adapted/mpl/detail/value_of_impl.hpp>
#include <boost/fusion/sequence/adapted/mpl/detail/equal_to_impl.hpp>
#include <boost/fusion/sequence/adapted/mpl/detail/distance_impl.hpp>
#include <boost/fusion/sequence/adapted/mpl/detail/advance_impl.hpp>
#include <boost/type_traits/remove_const.hpp>
namespace boost { namespace fusion
{
struct mpl_iterator_tag;
template <typename Iterator>
struct mpl_iterator
: iterator_base<mpl_iterator<Iterator> >
{
typedef mpl_iterator_tag ftag;
typedef typename detail::mpl_iterator_category<
typename Iterator::category>::type
category;
typedef typename remove_const<Iterator>::type iterator_type;
};
}}
#endif

View File

@ -0,0 +1,30 @@
/*=============================================================================
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(BOOST_FUSION_TAG_OF_31122005_1153)
#define BOOST_FUSION_TAG_OF_31122005_1153
#include <boost/fusion/support/tag_of_fwd.hpp>
#include <boost/fusion/support/detail/is_mpl_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion
{
struct mpl_sequence_tag;
namespace traits
{
template<typename Sequence>
struct tag_of<Sequence, typename boost::enable_if<detail::is_mpl_sequence<Sequence> >::type>
{
typedef mpl_sequence_tag type;
};
}
}}
#endif