Full merge from trunk at revision 41356 of entire boost-root tree.

[SVN r41370]
This commit is contained in:
Beman Dawes
2007-11-25 18:38:02 +00:00
parent ed9cb87ac3
commit d57e8cfe9e
455 changed files with 64511 additions and 0 deletions

View File

@ -0,0 +1,47 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
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_ADVANCE_IMPL_20060222_2150)
#define BOOST_FUSION_ADVANCE_IMPL_20060222_2150
namespace example
{
struct example_struct_iterator_tag;
template<typename Struct, int Pos>
struct example_struct_iterator;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct advance_impl;
template<>
struct advance_impl<example::example_struct_iterator_tag>
{
template<typename Iterator, typename N>
struct apply
{
typedef typename Iterator::struct_type struct_type;
typedef typename Iterator::index index;
typedef example::example_struct_iterator<
struct_type, index::value + N::value> type;
static type
call(Iterator const& it)
{
return type(it.struct_);
}
};
};
}
}}
#endif

View File

@ -0,0 +1,67 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_AT_IMPL_20060223_2017)
#define BOOST_FUSION_AT_IMPL_20060223_2017
#include <string>
#include <boost/mpl/if.hpp>
#include <boost/mpl/int.hpp>
#include <boost/type_traits/is_const.hpp>
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct at_impl;
template<>
struct at_impl<example::example_sequence_tag>
{
template<typename Sequence, typename Key>
struct apply;
template<typename Sequence>
struct apply<Sequence, mpl::int_<0> >
{
typedef typename mpl::if_<
is_const<Sequence>,
std::string const&,
std::string&>::type type;
static type
call(Sequence& seq)
{
return seq.name;
};
};
template<typename Sequence>
struct apply<Sequence, mpl::int_<1> >
{
typedef typename mpl::if_<
is_const<Sequence>,
int const&,
int&>::type type;
static type
call(Sequence& seq)
{
return seq.age;
};
};
};
}
}}
#endif

View File

@ -0,0 +1,72 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_AT_KEY_IMPL_20060223_2017)
#define BOOST_FUSION_AT_KEY_IMPL_20060223_2017
#include <string>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_const.hpp>
namespace fields
{
struct name;
struct age;
}
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct at_key_impl;
template<>
struct at_key_impl<example::example_sequence_tag>
{
template<typename Sequence, typename Key>
struct apply;
template<typename Sequence>
struct apply<Sequence, fields::name>
{
typedef typename mpl::if_<
is_const<Sequence>,
std::string const&,
std::string&>::type type;
static type
call(Sequence& seq)
{
return seq.name;
};
};
template<typename Sequence>
struct apply<Sequence, fields::age>
{
typedef typename mpl::if_<
is_const<Sequence>,
int const&,
int&>::type type;
static type
call(Sequence& seq)
{
return seq.age;
};
};
};
}
}}
#endif

View File

@ -0,0 +1,43 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_BEGIN_IMPL_20060222_2042)
#define BOOST_FUSION_BEGIN_IMPL_20060222_2042
#include "../example_struct_iterator.hpp"
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct begin_impl;
template<>
struct begin_impl<example::example_sequence_tag>
{
template<typename Sequence>
struct apply
{
typedef example::example_struct_iterator<Sequence, 0> type;
static type
call(Sequence& seq)
{
return type(seq);
}
};
};
}
}}
#endif

View File

@ -0,0 +1,34 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_CATEGORY_OF_IMPL_20060223_2037)
#define BOOST_FUSION_CATEGORY_OF_IMPL_20060223_2037
#include <boost/fusion/support/category_of.hpp>
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<>
struct category_of_impl<example::example_sequence_tag>
{
template<typename Sequence>
struct apply
{
struct type : random_access_traversal_tag, associative_sequence_tag {};
};
};
}
}}
#endif

View File

@ -0,0 +1,67 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
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_DEREF_IMPL_20060222_1952)
#define BOOST_FUSION_DEREF_IMPL_20060222_1952
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/if.hpp>
#include <string>
namespace example
{
struct example_struct_iterator_tag;
template<typename Struct, int Pos>
struct example_struct_iterator;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct deref_impl;
template<>
struct deref_impl<example::example_struct_iterator_tag>
{
template<typename Iterator>
struct apply;
template<typename Struct>
struct apply<example::example_struct_iterator<Struct, 0> >
{
typedef typename mpl::if_<
is_const<Struct>, std::string const&, std::string&>::type type;
static type
call(example::example_struct_iterator<Struct, 0> const& it)
{
return it.struct_.name;
}
};
template<typename Struct>
struct apply<example::example_struct_iterator<Struct, 1> >
{
typedef typename mpl::if_<
is_const<Struct>, int const&, int&>::type type;
static type
call(example::example_struct_iterator<Struct, 1> const& it)
{
return it.struct_.age;
}
};
};
}
}}
#endif

View File

@ -0,0 +1,44 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
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_DISTANCE_IMPL_20060223_0814)
#define BOOST_FUSION_DISTANCE_IMPL_20060223_0814
#include <boost/mpl/minus.hpp>
namespace example
{
struct example_struct_iterator_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct distance_impl;
template<>
struct distance_impl<example::example_struct_iterator_tag>
{
template<typename First, typename Last>
struct apply
: mpl::minus<typename Last::index, typename First::index>
{
typedef apply<First, Last> self;
static typename self::type
call(First const& first, Last const& last)
{
return typename self::type();
}
};
};
}
}}
#endif

View File

@ -0,0 +1,43 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_END_IMPL_20060222_2042)
#define BOOST_FUSION_END_IMPL_20060222_2042
#include "../example_struct_iterator.hpp"
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct end_impl;
template<>
struct end_impl<example::example_sequence_tag>
{
template<typename Sequence>
struct apply
{
typedef example::example_struct_iterator<Sequence, 2> type;
static type
call(Sequence& seq)
{
return type(seq);
}
};
};
}
}}
#endif

View File

@ -0,0 +1,38 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
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_EQUAL_TO_IMPL_20060223_1941)
#define BOOST_FUSION_EQUAL_TO_IMPL_20060223_1941
#include <boost/mpl/equal_to.hpp>
namespace example
{
struct example_struct_iterator_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct equal_to_impl;
template<>
struct equal_to_impl<example::example_struct_iterator_tag>
{
template<typename It1, typename It2>
struct apply
: mpl::equal_to<
typename It1::index,
typename It2::index>
{};
};
}
}}
#endif

View File

@ -0,0 +1,45 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_HAS_KEY_IMPL_20060223_2156)
#define BOOST_FUSION_HAS_KEY_IMPL_20060223_2156
#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/or.hpp>
namespace fields
{
struct name;
struct age;
}
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct has_key_impl;
template<>
struct has_key_impl<example::example_sequence_tag>
{
template<typename Sequence, typename Key>
struct apply
: mpl::or_<
is_same<Key, fields::name>,
is_same<Key, fields::age> >
{};
};
}
}}
#endif

View File

@ -0,0 +1,34 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_IS_SEQUENCE_IMPL_20060228_1946)
#define BOOST_FUSION_IS_SEQUENCE_IMPL_20060228_1946
#include <boost/mpl/bool.hpp>
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion
{
namespace extension
{
template<typename Tag>
struct is_sequence_impl;
template<>
struct is_sequence_impl<example::example_sequence_tag>
{
template<typename T>
struct apply : mpl::true_ {};
};
}
}}
#endif

View File

@ -0,0 +1,32 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_IS_VIEW_IMPL_200604227_2150)
#define BOOST_FUSION_IS_VIEW_IMPL_200604227_2150
#include <boost/mpl/bool.hpp>
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion
{
namespace extension
{
template<typename Tag>
struct is_view_impl;
template<>
struct is_view_impl<example::example_sequence_tag>
: boost::mpl::false_
{};
}
}}
#endif

View File

@ -0,0 +1,46 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
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_NEXT_IMPL_20060222_1859)
#define BOOST_FUSION_NEXT_IMPL_20060222_1859
namespace example
{
struct example_struct_iterator_tag;
template<typename Struct, int Pos>
struct example_struct_iterator;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct next_impl;
template<>
struct next_impl<example::example_struct_iterator_tag>
{
template<typename Iterator>
struct apply
{
typedef typename Iterator::struct_type struct_type;
typedef typename Iterator::index index;
typedef example::example_struct_iterator<struct_type, index::value + 1> type;
static type
call(Iterator const& i)
{
return type(i.struct_);
}
};
};
}
}}
#endif

View File

@ -0,0 +1,46 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
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_PRIOR_IMPL_20060222_1944)
#define BOOST_FUSION_PRIOR_IMPL_20060222_1944
namespace example
{
struct example_struct_iterator_tag;
template<typename Struct, int Pos>
struct example_struct_iterator;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct prior_impl;
template<>
struct prior_impl<example::example_struct_iterator_tag>
{
template<typename Iterator>
struct apply
{
typedef typename Iterator::struct_type struct_type;
typedef typename Iterator::index index;
typedef example::example_struct_iterator<struct_type, index::value - 1> type;
static type
call(Iterator const& i)
{
return type(i.struct_);
}
};
};
}
}}
#endif

View File

@ -0,0 +1,36 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_SIZE_IMPL_20060223_2033)
#define BOOST_FUSION_SIZE_IMPL_20060223_2033
#include <boost/mpl/int.hpp>
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct size_impl;
template<>
struct size_impl<example::example_sequence_tag>
{
template<typename Sequence>
struct apply
: mpl::int_<2>
{};
};
}
}}
#endif

View File

@ -0,0 +1,44 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_VALUE_AT_IMPL_20060223_2025)
#define BOOST_FUSION_VALUE_AT_IMPL_20060223_2025
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct value_at_impl;
template<>
struct value_at_impl<example::example_sequence_tag>
{
template<typename Sequence, typename N>
struct apply;
template<typename Sequence>
struct apply<Sequence, mpl::int_<0> >
{
typedef std::string type;
};
template<typename Sequence>
struct apply<Sequence, mpl::int_<1> >
{
typedef int type;
};
};
}
}}
#endif

View File

@ -0,0 +1,50 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
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_VALUE_AT_KEY_IMPL_20060223_2025)
#define BOOST_FUSION_VALUE_AT_KEY_IMPL_20060223_2025
namespace fields
{
struct name;
struct age;
}
namespace example
{
struct example_sequence_tag;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct value_at_key_impl;
template<>
struct value_at_key_impl<example::example_sequence_tag>
{
template<typename Sequence, typename N>
struct apply;
template<typename Sequence>
struct apply<Sequence, fields::name>
{
typedef std::string type;
};
template<typename Sequence>
struct apply<Sequence, fields::age>
{
typedef int type;
};
};
}
}}
#endif

View File

@ -0,0 +1,49 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
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_VALUE_OF_IMPL_20060223_1905)
#define BOOST_FUSION_VALUE_OF_IMPL_20060223_1905
#include <string>
namespace example
{
struct example_struct_iterator_tag;
template<typename Struct, int Pos>
struct example_struct_iterator;
}
namespace boost { namespace fusion {
namespace extension
{
template<typename Tag>
struct value_of_impl;
template<>
struct value_of_impl<example::example_struct_iterator_tag>
{
template<typename Iterator>
struct apply;
template<typename Struct>
struct apply<example::example_struct_iterator<Struct, 0> >
{
typedef std::string type;
};
template<typename Struct>
struct apply<example::example_struct_iterator<Struct, 1> >
{
typedef int type;
};
};
}
}}
#endif