diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-01-12 18:41:34 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-01-13 10:36:26 (GMT) |
commit | f3bc816af1b0d61452de973963e453bf3b3f95a2 (patch) | |
tree | e895f8afa3580e6cff6f5ad2017d45bf147a17c2 /3rdParty/Boost/src/boost/fusion/view/single_view/detail | |
parent | 188fc285c6555eadd3c9d50ab8a94adcade78d89 (diff) | |
download | swift-contrib-f3bc816af1b0d61452de973963e453bf3b3f95a2.zip swift-contrib-f3bc816af1b0d61452de973963e453bf3b3f95a2.tar.bz2 |
Adding in the spirit Boost stuff
Change-Id: I4f127ce61667243b64081b0aa309028d5077045f
Diffstat (limited to '3rdParty/Boost/src/boost/fusion/view/single_view/detail')
12 files changed, 515 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/advance_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/advance_impl.hpp new file mode 100644 index 0000000..d0846ec --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/advance_impl.hpp @@ -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 diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/at_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/at_impl.hpp new file mode 100644 index 0000000..3e0915f --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/at_impl.hpp @@ -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 diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/begin_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/begin_impl.hpp new file mode 100644 index 0000000..eb1a3ee --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/begin_impl.hpp @@ -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 + + diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/deref_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/deref_impl.hpp new file mode 100644 index 0000000..b5b37a6 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/deref_impl.hpp @@ -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 + + diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/distance_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/distance_impl.hpp new file mode 100644 index 0000000..fec204c --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/distance_impl.hpp @@ -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 diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/end_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/end_impl.hpp new file mode 100644 index 0000000..e069b24 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/end_impl.hpp @@ -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 + + diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/equal_to_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/equal_to_impl.hpp new file mode 100644 index 0000000..c9a7ebd --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/equal_to_impl.hpp @@ -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 diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/next_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/next_impl.hpp new file mode 100644 index 0000000..1ebc502 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/next_impl.hpp @@ -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 + + diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/prior_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/prior_impl.hpp new file mode 100644 index 0000000..ece6795 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/prior_impl.hpp @@ -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 diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/size_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/size_impl.hpp new file mode 100644 index 0000000..eba89cd --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/size_impl.hpp @@ -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 + + diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/value_at_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/value_at_impl.hpp new file mode 100644 index 0000000..a8c20ad --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/value_at_impl.hpp @@ -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 diff --git a/3rdParty/Boost/src/boost/fusion/view/single_view/detail/value_of_impl.hpp b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/value_of_impl.hpp new file mode 100644 index 0000000..81e8817 --- /dev/null +++ b/3rdParty/Boost/src/boost/fusion/view/single_view/detail/value_of_impl.hpp @@ -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 + + |