Added boost header

This commit is contained in:
Christophe Riccio
2012-01-08 01:26:07 +00:00
parent 9c3faaca40
commit c7d752cdf8
8946 changed files with 1732316 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_ADVANCE_IMPL_JUL_07_2011_1348PM)
#define BOOST_FUSION_SINGLE_VIEW_ADVANCE_IMPL_JUL_07_2011_1348PM
#include <boost/mpl/plus.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
template <typename SingleView, typename Pos>
struct single_view_iterator;
namespace extension
{
template<typename Tag>
struct advance_impl;
template<>
struct advance_impl<single_view_iterator_tag>
{
template<typename Iterator, typename Dist>
struct apply
{
typedef single_view_iterator<
typename Iterator::single_view_type,
typename mpl::plus<typename Iterator::position, Dist>::type>
type;
static type
call(Iterator const& i)
{
return type(i.view);
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,44 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_AT_IMPL_JUL_07_2011_1348PM)
#define BOOST_FUSION_SINGLE_VIEW_AT_IMPL_JUL_07_2011_1348PM
#include <boost/mpl/int.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/equal_to.hpp>
namespace boost { namespace fusion
{
struct single_view_tag;
namespace extension
{
template<typename Tag>
struct at_impl;
template<>
struct at_impl<single_view_tag>
{
template<typename Sequence, typename N>
struct apply
{
BOOST_MPL_ASSERT((mpl::equal_to<N, mpl::int_<0> >));
typedef typename Sequence::value_type type;
static type
call(Sequence& seq)
{
return seq.val;
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,45 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_BEGIN_IMPL_05052005_0305)
#define BOOST_FUSION_SINGLE_VIEW_BEGIN_IMPL_05052005_0305
#include <boost/mpl/int.hpp>
namespace boost { namespace fusion
{
struct single_view_tag;
template <typename SingleView, typename Pos>
struct single_view_iterator;
namespace extension
{
template <typename Tag>
struct begin_impl;
template <>
struct begin_impl<single_view_tag>
{
template <typename Sequence>
struct apply
{
typedef single_view_iterator<Sequence, mpl::int_<0> > type;
static type
call(Sequence& seq)
{
return type(seq);
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,45 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_DEREF_IMPL_05052005_0258)
#define BOOST_FUSION_SINGLE_VIEW_DEREF_IMPL_05052005_0258
#include <boost/mpl/int.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/equal_to.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
namespace extension
{
template <typename Tag>
struct deref_impl;
template <>
struct deref_impl<single_view_iterator_tag>
{
template <typename Iterator>
struct apply
{
BOOST_MPL_ASSERT((mpl::equal_to<typename Iterator::position, mpl::int_<0> >));
typedef typename Iterator::value_type type;
static type
call(Iterator const& i)
{
return i.view.val;
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,43 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_DISTANCE_IMPL_JUL_07_2011_1348PM)
#define BOOST_FUSION_SINGLE_VIEW_DISTANCE_IMPL_JUL_07_2011_1348PM
#include <boost/mpl/minus.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
namespace extension
{
template<typename Tag>
struct distance_impl;
template<>
struct distance_impl<single_view_iterator_tag>
{
template<typename First, typename Last>
struct apply
: mpl::minus<typename Last::position, typename First::position>
{
typedef typename mpl::minus<typename Last::position,
typename First::position>::type type;
static type
call(First const& /*first*/, Last const& /*last*/)
{
return type();
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,45 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_END_IMPL_05052005_0332)
#define BOOST_FUSION_SINGLE_VIEW_END_IMPL_05052005_0332
#include <boost/mpl/int.hpp>
namespace boost { namespace fusion
{
struct single_view_tag;
template <typename SingleView, typename Pos>
struct single_view_iterator;
namespace extension
{
template <typename Tag>
struct end_impl;
template <>
struct end_impl<single_view_tag>
{
template <typename Sequence>
struct apply
{
typedef single_view_iterator<Sequence, mpl::int_<1> > type;
static type
call(Sequence& seq)
{
return type(seq);
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,39 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_ITERATOR_JUL_07_2011_1348PM)
#define BOOST_FUSION_SINGLE_VIEW_ITERATOR_JUL_07_2011_1348PM
#include <boost/mpl/assert.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/add_const.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
namespace extension
{
template<typename Tag>
struct equal_to_impl;
template<>
struct equal_to_impl<single_view_iterator_tag>
{
template<typename It1, typename It2>
struct apply
: mpl::equal_to<typename It1::position, typename It2::position>
{
BOOST_MPL_ASSERT((is_same<typename add_const<typename It1::single_view_type>::type,
typename add_const<typename It2::single_view_type>::type>));
};
};
}
}}
#endif

View File

@@ -0,0 +1,50 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_NEXT_IMPL_05052005_0331)
#define BOOST_FUSION_SINGLE_VIEW_NEXT_IMPL_05052005_0331
#include <boost/mpl/next.hpp>
#include <boost/static_assert.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
template <typename SingleView, typename Pos>
struct single_view_iterator;
namespace extension
{
template <typename Tag>
struct next_impl;
template <>
struct next_impl<single_view_iterator_tag>
{
template <typename Iterator>
struct apply
{
typedef single_view_iterator<
typename Iterator::single_view_type,
typename mpl::next<typename Iterator::position>::type>
type;
static type
call(Iterator const& i)
{
BOOST_STATIC_ASSERT((type::position::value < 2));
return type(i.view);
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,46 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_PRIOR_IMPL_JUL_07_2011_1348PM)
#define BOOST_FUSION_SINGLE_VIEW_PRIOR_IMPL_JUL_07_2011_1348PM
#include <boost/mpl/prior.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
template <typename Sequence, typename Pos>
struct single_view_iterator;
namespace extension
{
template <typename Tag>
struct prior_impl;
template <>
struct prior_impl<single_view_iterator_tag>
{
template <typename Iterator>
struct apply
{
typedef single_view_iterator<
typename Iterator::single_view_type,
typename mpl::prior<typename Iterator::position>::type>
type;
static type
call(Iterator const& i)
{
return type(i.view);
}
};
};
}
}}
#endif

View File

@@ -0,0 +1,33 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_SIZE_IMPL_JUL_07_2011_1348PM)
#define FUSION_SINGLE_VIEW_SIZE_IMPL_JUL_07_2011_1348PM
namespace boost { namespace fusion
{
struct single_view_tag;
namespace extension
{
template <typename Tag>
struct size_impl;
template <>
struct size_impl<single_view_tag>
{
template <typename Sequence>
struct apply
{
typedef mpl::int_<1> type;
};
};
}
}}
#endif

View File

@@ -0,0 +1,39 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_VALUE_AT_IMPL_JUL_07_2011_1348PM)
#define BOOST_FUSION_SINGLE_VIEW_VALUE_AT_IMPL_JUL_07_2011_1348PM
#include <boost/mpl/int.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
namespace boost { namespace fusion
{
struct single_view_tag;
namespace extension
{
template<typename Tag>
struct value_at_impl;
template<>
struct value_at_impl<single_view_tag>
{
template<typename Sequence, typename N>
struct apply
{
BOOST_MPL_ASSERT((mpl::equal_to<N, mpl::int_<0> >));
typedef typename Sequence::value_type type;
};
};
}
}}
#endif

View File

@@ -0,0 +1,39 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_VALUE_OF_IMPL_05052005_0324)
#define BOOST_FUSION_SINGLE_VIEW_VALUE_OF_IMPL_05052005_0324
#include <boost/mpl/int.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/equal_to.hpp>
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
namespace extension
{
template <typename Tag>
struct value_of_impl;
template <>
struct value_of_impl<single_view_iterator_tag>
{
template <typename Iterator>
struct apply
{
BOOST_MPL_ASSERT((mpl::equal_to<typename Iterator::position, mpl::int_<0> >));
typedef typename Iterator::value_type type;
};
};
}
}}
#endif

View File

@@ -0,0 +1,68 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_05052005_0335)
#define BOOST_FUSION_SINGLE_VIEW_05052005_0335
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/view/single_view/single_view_iterator.hpp>
#include <boost/fusion/view/single_view/detail/at_impl.hpp>
#include <boost/fusion/view/single_view/detail/begin_impl.hpp>
#include <boost/fusion/view/single_view/detail/end_impl.hpp>
#include <boost/fusion/view/single_view/detail/size_impl.hpp>
#include <boost/fusion/view/single_view/detail/value_at_impl.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/int.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
struct single_view_tag;
struct random_access_traversal_tag;
struct fusion_sequence_tag;
template <typename T>
struct single_view : sequence_base<single_view<T> >
{
typedef single_view_tag fusion_tag;
typedef fusion_sequence_tag tag; // this gets picked up by MPL
typedef random_access_traversal_tag category;
typedef mpl::true_ is_view;
typedef mpl::int_<1> size;
typedef T value_type;
single_view()
: val() {}
explicit single_view(typename detail::call_param<T>::type in_val)
: val(in_val) {}
value_type val;
};
template <typename T>
inline single_view<typename detail::as_fusion_element<T>::type>
make_single_view(T const& v)
{
return single_view<typename detail::as_fusion_element<T>::type>(v);
}
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@@ -0,0 +1,58 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Eric Niebler
Distributed under 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_SINGLE_VIEW_ITERATOR_05052005_0340)
#define BOOST_FUSION_SINGLE_VIEW_ITERATOR_05052005_0340
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/support/iterator_base.hpp>
#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
#include <boost/fusion/view/single_view/detail/next_impl.hpp>
#include <boost/fusion/view/single_view/detail/prior_impl.hpp>
#include <boost/fusion/view/single_view/detail/advance_impl.hpp>
#include <boost/fusion/view/single_view/detail/distance_impl.hpp>
#include <boost/fusion/view/single_view/detail/equal_to_impl.hpp>
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
#include <boost/config.hpp>
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace fusion
{
struct single_view_iterator_tag;
struct random_access_traversal_tag;
template <typename SingleView, typename Pos>
struct single_view_iterator
: iterator_base<single_view_iterator<SingleView, Pos> >
{
typedef single_view_iterator_tag fusion_tag;
typedef random_access_traversal_tag category;
typedef typename SingleView::value_type value_type;
typedef Pos position;
typedef SingleView single_view_type;
explicit single_view_iterator(single_view_type& in_view)
: view(in_view) {}
SingleView& view;
private:
single_view_iterator& operator=(single_view_iterator const&);
};
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif