restore from the CVS crash

[SVN r18356]
This commit is contained in:
Aleksey Gurtovoy
2003-05-08 09:43:23 +00:00
parent a131b28904
commit 92a396c893
13 changed files with 303 additions and 53 deletions

View File

@@ -0,0 +1,57 @@
#ifndef BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
#define BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED
// + file: boost/mpl/aux_/preprocessor/is_seq.hpp
// + last modified: 03/may/03
// Copyright (c) 2003
// Paul Mensonides, Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/preprocessor/seq/size.hpp"
#include "boost/preprocessor/arithmetic/dec.hpp"
#include "boost/preprocessor/punctuation/paren.hpp"
#include "boost/preprocessor/cat.hpp"
#include "boost/preprocessor/config/config.hpp"
// returns 1 if 'seq' is a PP-sequence, 0 otherwise:
//
// BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_IS_SEQ( int ) ) )
// BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (int) ) )
// BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (1)(2) ) )
#if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()
# define BOOST_MPL_PP_IS_SEQ(seq) BOOST_PP_DEC( BOOST_PP_SEQ_SIZE( BOOST_MPL_PP_IS_SEQ_(seq) ) )
# define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_MPL_PP_IS_SEQ_SEQ_( BOOST_MPL_PP_IS_SEQ_SPLIT_ seq )
# define BOOST_MPL_PP_IS_SEQ_SEQ_(x) (x)
# define BOOST_MPL_PP_IS_SEQ_SPLIT_(unused) unused)((unused)
#else
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_MWCC_((seq))
# define BOOST_MPL_PP_IS_SEQ_MWCC_(args) BOOST_MPL_PP_IS_SEQ_ ## args
# else
# define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_(seq)
# endif
# define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_PP_CAT(BOOST_MPL_PP_IS_SEQ_, BOOST_MPL_PP_IS_SEQ_0 seq BOOST_PP_RPAREN())
# define BOOST_MPL_PP_IS_SEQ_0(x) BOOST_MPL_PP_IS_SEQ_1(x
# define BOOST_MPL_PP_IS_SEQ_ALWAYS_0(unused) 0
# define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_0 BOOST_MPL_PP_IS_SEQ_ALWAYS_0(
# define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_1(unused) 1
#endif
#endif // BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED

View File

@@ -0,0 +1,59 @@
#ifndef BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED
#define BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED
// + file: boost/mpl/aux_/preprocessor/token_equal.hpp
// + last modified: 03/may/03
// Copyright (c) 2003
// Paul Mensonides, Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/aux_/preprocessor/is_seq.hpp"
#include "boost/preprocessor/if.hpp"
#include "boost/preprocessor/logical/bitand.hpp"
#include "boost/preprocessor/logical/compl.hpp"
#include "boost/preprocessor/tuple/eat.hpp"
#include "boost/preprocessor/cat.hpp"
// compares tokens 'a' and 'b' for equality:
//
// #define BOOST_MPL_PP_TOKEN_EQUAL_apple(x) x
// #define BOOST_MPL_PP_TOKEN_EQUAL_orange(x) x
//
// BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(apple, abc) ) )
// BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(abc, apple) ) )
// BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(apple, orange) ) )
// BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(apple, apple) )
// BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(orange, orange) )
#define BOOST_MPL_PP_TOKEN_EQUAL(a, b) \
BOOST_PP_IIF( \
BOOST_PP_BITAND( \
BOOST_MPL_PP_IS_SEQ( BOOST_PP_CAT(BOOST_MPL_PP_TOKEN_EQUAL_, a)((unused)) ) \
, BOOST_MPL_PP_IS_SEQ( BOOST_PP_CAT(BOOST_MPL_PP_TOKEN_EQUAL_, b)((unused)) ) \
) \
, BOOST_MPL_PP_TOKEN_EQUAL_I \
, 0 BOOST_PP_TUPLE_EAT(2) \
)(a, b) \
/**/
#define BOOST_MPL_PP_TOKEN_EQUAL_I(a, b) \
BOOST_PP_COMPL(BOOST_MPL_PP_IS_SEQ( \
BOOST_MPL_PP_TOKEN_EQUAL_ ## a( \
BOOST_MPL_PP_TOKEN_EQUAL_ ## b \
)((unused)) \
)) \
/**/
#endif // BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED

View File

@@ -0,0 +1,27 @@
#ifndef BOOST_MPL_AUX_TEST_HPP_INCLUDED
#define BOOST_MPL_AUX_TEST_HPP_INCLUDED
// + file: boost/mpl/aux_/test.hpp
// + last modified: 04/may/03
// Copyright (c) 2002-03
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/aux_/test/assert.hpp"
#include "boost/mpl/aux_/test/data.hpp"
#include "boost/mpl/aux_/test/test_case.hpp"
#include "boost/mpl/aux_/test/for_each.hpp"
#include "boost/mpl/aux_/config/msvc_typename.hpp"
#endif // BOOST_MPL_AUX_TEST_HPP_INCLUDED

View File

@@ -1,10 +1,12 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/yes_no.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
// Peter Dimov, Aleksey Gurtovoy
#ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
#define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
// + file: boost/mpl/aux_/yes_no.hpp
// + last modified: 05/may/03
// Copyright (c) 2000-03
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
@@ -13,19 +15,24 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
#define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
namespace boost {
namespace mpl {
namespace aux {
namespace boost { namespace mpl { namespace aux {
typedef char (&no_tag)[1];
typedef char (&yes_tag)[2];
} // namespace aux
} // namespace mpl
} // namespace boost
template< bool C_ > struct yes_no_tag
{
typedef no_tag type;
};
template<> struct yes_no_tag<true>
{
typedef yes_tag type;
};
}}}
#endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED

View File

@@ -115,7 +115,7 @@ struct if_
// on the result of is_reference.
template <class T1, class T2, class T3, class T4> struct bind3;
template <template <class T1, class T2, class T3> class> struct quote3;
template <template <class T1, class T2, class T3> class F> struct quote3;
namespace aux
{

View File

@@ -28,14 +28,14 @@ namespace mpl {
template<
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence)
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Pos)
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Pos_or_T)
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T)
>
struct insert
: insert_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) >
::template algorithm< Sequence,Pos,T >
::template algorithm< Sequence,Pos_or_T,T >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos,T))
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T))
};
BOOST_MPL_AUX_VOID_SPEC(3, insert)

View File

@@ -1,9 +1,11 @@
//-----------------------------------------------------------------------------
// boost mpl/insert_fwd.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
#ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED
#define BOOST_MPL_INSERT_FWD_HPP_INCLUDED
// + file: boost/mpl/insert_fwd.hpp
// + last modified: 02/may/03
// Copyright (c) 2000-03
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -13,15 +15,14 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED
#define BOOST_MPL_INSERT_FWD_HPP_INCLUDED
//
// See http://www.boost.org/libs/mpl for documentation.
namespace boost {
namespace mpl {
template< typename Tag > struct insert_traits;
template< typename Sequence, typename Pos, typename T > struct insert;
template< typename Sequence, typename Pos_or_T, typename T > struct insert;
} // namespace mpl
} // namespace boost

View File

@@ -0,0 +1,60 @@
#ifndef BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
// + file: boost/mpl/aux_/insert_impl.hpp
// + last modified: 05/may/03
// Copyright (c) 2002-03
// David Abrahams, Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/set/aux_/has_key_impl.hpp"
#include "boost/mpl/set/aux_/item.hpp"
#include "boost/mpl/set/aux_/tag.hpp"
#include "boost/mpl/insert_fwd.hpp"
#include "boost/mpl/identity.hpp"
#include "boost/mpl/base.hpp"
#include "boost/mpl/apply_if.hpp"
#include "boost/type_traits/is_same.hpp"
namespace boost {
namespace mpl {
template<>
struct insert_traits< aux::set_tag >
{
template< typename Set, typename T, typename unused_ > struct algorithm
: apply_if<
has_key_impl<aux::set_tag>::apply<Set,T>
, apply_if<
is_same< T,typename Set::last_masked >
, base<Set>
, identity<Set>
>
, identity< s_item<T,Set> >
>
/*
: eval< if_<
has_key<Set,T>
, if_< is_same< T,typename Set::last_masked >, base< arg<Set> >, Set >
, Set
> >
*/
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED

View File

@@ -19,6 +19,7 @@
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/long.hpp"
#include "boost/mpl/void_fwd.hpp"
#include "boost/mpl/set/aux_/set0.hpp"
#include "boost/mpl/aux_/yes_no.hpp"
#include "boost/mpl/aux_/type_wrapper.hpp"
@@ -61,8 +62,9 @@ template< typename T, typename Base >
struct s_item
: Base
{
typedef T item;
typedef Base base;
typedef void_ last_masked;
typedef T item;
typedef Base base;
BOOST_STATIC_CONSTANT(long, order = Base::order + 1);
@@ -87,6 +89,7 @@ template< typename T, typename Base >
struct s_mask
: Base
{
typedef T last_masked;
#if BOOST_WORKAROUND(__GNUC__, > 2) && BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(3))
// to make GCC happy
friend aux::no_tag operator%<>(s_mask const&, aux::type_wrapper<T>*);

View File

@@ -18,7 +18,7 @@
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/void.hpp"
#include "boost/mpl/void_fwd.hpp"
#include "boost/mpl/set/aux_/tag.hpp"
#include "boost/mpl/aux_/config/static_constant.hpp"
@@ -27,8 +27,10 @@ namespace mpl {
template< int p_ = 0 > struct set0
{
typedef aux::set_tag tag;
typedef void_ item;
typedef aux::set_tag tag;
typedef void_ last_masked;
typedef void_ item;
BOOST_STATIC_CONSTANT(long, order = 0);
};

View File

@@ -27,6 +27,8 @@
//#include "boost/mpl/set/aux_/O1_size.hpp"
//#include "boost/mpl/set/aux_/size.hpp"
//#include "boost/mpl/set/aux_/empty.hpp"
//#include "boost/mpl/set/aux_/empty.hpp"
#include "boost/mpl/set/aux_/insert_impl.hpp"
#include "boost/mpl/set/aux_/order_impl.hpp"
#include "boost/mpl/set/aux_/has_key_impl.hpp"
#include "boost/mpl/set/aux_/begin_end_impl.hpp"

View File

@@ -1,9 +1,11 @@
//-----------------------------------------------------------------------------
// boost mpl/void.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
#ifndef BOOST_MPL_VOID_HPP_INCLUDED
#define BOOST_MPL_VOID_HPP_INCLUDED
// + file: boost/mpl/void.hpp
// + last modified: 05/may/03
// Copyright (c) 2001-03
// Peter Dimov, Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -13,12 +15,13 @@
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
#ifndef BOOST_MPL_VOID_HPP_INCLUDED
#define BOOST_MPL_VOID_HPP_INCLUDED
#include "boost/mpl/void_fwd.hpp"
#include "boost/mpl/bool.hpp"
#include "boost/config.hpp"
#include "boost/mpl/aux_/config/msvc.hpp"
#include "boost/mpl/aux_/config/workaround.hpp"
namespace boost {
namespace mpl {
@@ -33,7 +36,7 @@ template< typename T >
struct is_void_
: false_
{
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
using false_::value;
#endif
};
@@ -42,7 +45,7 @@ template<>
struct is_void_<void_>
: true_
{
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
using true_::value;
#endif
};

View File

@@ -0,0 +1,29 @@
#ifndef BOOST_MPL_VOID_FWD_HPP_INCLUDED
#define BOOST_MPL_VOID_FWD_HPP_INCLUDED
// + file: boost/mpl/void_fwd.hpp
// + last modified: 05/may/03
// Copyright (c) 2001-03
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
namespace boost {
namespace mpl {
struct void_;
} // namespace mpl
} // namespace boost
#endif // BOOST_MPL_VOID_FWD_HPP_INCLUDED