pre-1.29.0 update

[SVN r15762]
This commit is contained in:
Aleksey Gurtovoy 2002-10-07 11:32:25 +00:00
parent 4e5cec2471
commit 1406f145b0
55 changed files with 485 additions and 243 deletions

View File

@ -18,12 +18,9 @@
#define BOOST_MPL_ALWAYS_HPP_INCLUDED
#include "boost/mpl/aux_/preprocessor/def_params_tail.hpp"
#include "boost/mpl/limits/arity.hpp"
#include "boost/mpl/void.hpp"
#include "boost/mpl/aux_/arity.hpp"
#include "boost/mpl/aux_/arity_spec.hpp"
#include "boost/mpl/aux_/lambda_spec.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/config.hpp"
namespace boost {
namespace mpl {
@ -33,7 +30,7 @@ struct always
{
template<
typename T
BOOST_MPL_PP_DEF_PARAMS_TAIL(1, typename T)
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, void_)
>
struct apply
{
@ -41,18 +38,8 @@ struct always
};
};
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
namespace aux {
template< int N, typename T >
struct arity< always<T>, N >
{
BOOST_STATIC_CONSTANT(int
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
);
};
}
#endif
BOOST_MPL_AUX_ARITY_SPEC(1,always)
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,always)
} // namespace mpl

View File

@ -46,7 +46,8 @@
# include "boost/mpl/aux_/preprocessor/add.hpp"
# include "boost/mpl/aux_/preprocessor/sub.hpp"
# include "boost/mpl/aux_/config/dtp.hpp"
# include "boost/mpl/aux_/config/lambda_support.hpp"
# include "boost/mpl/aux_/config/eti.hpp"
# include "boost/mpl/aux_/config/lambda.hpp"
# include "boost/preprocessor/comma_if.hpp"
# include "boost/preprocessor/inc.hpp"
@ -221,7 +222,7 @@ struct BOOST_PP_CAT(apply,i)<AUX_APPLY_N_SPEC_PARAMS(i, int)>
typedef BOOST_PP_CAT(apply,i) type;
};
# elif defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# elif defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
// MWCW/Borland version
namespace aux {

View File

@ -24,7 +24,8 @@
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/arg_fwd.hpp"
# include "boost/mpl/void.hpp"
# include "boost/mpl/aux_/arity.hpp"
# include "boost/mpl/aux_/arity_spec.hpp"
# include "boost/static_assert.hpp"
#endif
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
@ -39,7 +40,8 @@
# include "boost/mpl/limits/arity.hpp"
# include "boost/mpl/aux_/preprocessor/default_params.hpp"
# include "boost/mpl/aux_/preprocessor/params.hpp"
# include "boost/mpl/aux_/config/lambda_support.hpp"
# include "boost/mpl/aux_/config/lambda.hpp"
# include "boost/mpl/aux_/config/dtp.hpp"
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/inc.hpp"
@ -50,6 +52,7 @@ namespace boost {
namespace mpl {
// local macro, #undef-ined at the end of the header
#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define AUX_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_METAFUNCTION_MAX_ARITY \
@ -57,6 +60,14 @@ namespace mpl {
, value \
) \
/**/
#else
# define AUX_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_PARAMS( \
BOOST_MPL_METAFUNCTION_MAX_ARITY \
, param \
) \
/**/
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/arg.hpp"))
@ -65,18 +76,7 @@ namespace mpl {
# undef AUX_ARG_N_DEFAULT_PARAMS
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
// MWCW/Borland workaround
namespace aux {
template< int N, int A >
struct arity< arg<N>, A >
{
BOOST_STATIC_CONSTANT(int
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
);
};
}
#endif
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg)
} // namespace mpl
} // namespace boost
@ -105,10 +105,10 @@ template<> struct arg<i>
struct apply
{
typedef BOOST_PP_CAT(U,i) type;
typedef char arity_constraint[
::boost::mpl::aux::reject_if_void_<type>::value
];
};
#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x561 && defined(BOOST_STRICT_CONFIG))
BOOST_STATIC_ASSERT(!is_void_<type>::value);
#endif
};
};
#else
@ -126,9 +126,9 @@ template<> struct arg<-1>
struct apply
{
typedef U1 type;
typedef char arity_constraint[
::boost::mpl::aux::reject_if_void_<type>::value
];
#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x561 && defined(BOOST_STRICT_CONFIG))
BOOST_STATIC_ASSERT(!is_void_<type>::value);
#endif
};
};

View File

@ -40,7 +40,7 @@ struct divides_c
#endif
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
#if defined(BOOST_MPL_MSVC_70_ETI_BUG)
template<>
struct divides_c<long,0,0,0,0,0>
{

View File

@ -40,7 +40,7 @@ struct modulus_c
#endif
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
#if defined(BOOST_MPL_MSVC_70_ETI_BUG)
template<>
struct modulus_c<long,0,0>
{

View File

@ -28,23 +28,23 @@ namespace boost {
namespace mpl {
template<
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N)
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence)
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence)
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N)
>
struct at
: at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) >
::template algorithm< N,Sequence >
::template algorithm< Sequence,N >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(N,Sequence))
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N))
};
template<
long N
, typename Sequence
typename Sequence
, long N
>
struct at_c
: at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) >
::template algorithm< integral_c<long,N>,Sequence >
::template algorithm< Sequence,integral_c<long,N> >
{
};

View File

@ -21,7 +21,7 @@ namespace boost {
namespace mpl {
template< typename Tag > struct at_traits;
template< typename N, typename Sequence > struct at;
template< typename Sequence, typename N > struct at;
} // namespace mpl
} // namespace boost

View File

@ -83,6 +83,7 @@ struct advance_backward
///// iteration, depth == 1
#elif BOOST_PP_ITERATION_DEPTH() == 1
#define i BOOST_PP_FRAME_ITERATION(1)
template<>
struct advance_backward< BOOST_PP_FRAME_ITERATION(1) >
@ -91,18 +92,26 @@ struct advance_backward< BOOST_PP_FRAME_ITERATION(1) >
{
typedef Iterator iter0;
#if i > 0
# define BOOST_PP_ITERATION_PARAMS_2 \
(3,(1, BOOST_PP_FRAME_ITERATION(1), "boost/mpl/aux_/advance_backward.hpp"))
# include BOOST_PP_ITERATE()
#endif
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type;
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
template<> struct apply<int> { typedef int type; };
//: ETI workaround
template<> struct apply<int>
{
typedef int type;
};
#endif
};
#undef i
///// iteration, depth == 2
#elif BOOST_PP_ITERATION_DEPTH() == 2

View File

@ -83,6 +83,7 @@ struct advance_forward
///// iteration, depth == 1
#elif BOOST_PP_ITERATION_DEPTH() == 1
#define i BOOST_PP_FRAME_ITERATION(1)
template<>
struct advance_forward< BOOST_PP_FRAME_ITERATION(1) >
@ -91,18 +92,25 @@ struct advance_forward< BOOST_PP_FRAME_ITERATION(1) >
{
typedef Iterator iter0;
#if i > 0
# define BOOST_PP_ITERATION_PARAMS_2 \
(3,(1, BOOST_PP_FRAME_ITERATION(1), "boost/mpl/aux_/advance_forward.hpp"))
(3,(1, i, "boost/mpl/aux_/advance_forward.hpp"))
# include BOOST_PP_ITERATE()
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type;
#endif
typedef BOOST_PP_CAT(iter,i) type;
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
template<> struct apply<int> { typedef int type; };
//: ETI workaround
template<> struct apply<int>
{
typedef int type;
};
#endif
};
#undef i
///// iteration, depth == 2
#elif BOOST_PP_ITERATION_DEPTH() == 2

View File

@ -25,8 +25,8 @@
/**/
#if defined(BOOST_MPL_USE_APPLY_INTERNALLY) \
|| defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
|| (defined(BOOST_MSVC) && (BOOST_MSVC < 1300))
|| defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
|| (defined(BOOST_MSVC) && (BOOST_MSVC <= 1300))
# if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/apply.hpp"

View File

@ -19,7 +19,7 @@
#include "boost/mpl/aux_/config/dtp.hpp"
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# include "boost/config.hpp"
@ -40,6 +40,6 @@ struct arity
} // namespace mpl
} // namespace boost
#endif // BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
#endif // BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
#endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED

View File

@ -0,0 +1,49 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/arity_spec.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
// 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.
#ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED
#define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/preprocessor/params.hpp"
#include "boost/mpl/aux_/arity.hpp"
#include "boost/mpl/limits/arity.hpp"
#include "boost/config.hpp"
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \
namespace aux { \
template< int N, BOOST_MPL_PP_PARAMS(i,type T) > \
struct arity< \
name< BOOST_MPL_PP_PARAMS(i,T) > \
, N \
> \
{ \
BOOST_STATIC_CONSTANT(int \
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY \
); \
}; \
} \
/**/
#else
# define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/
#endif
# define BOOST_MPL_AUX_ARITY_SPEC(i,name) \
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \
/**/
#endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED

View File

@ -31,7 +31,7 @@ namespace mpl {
template< typename Tag >
struct at_traits
{
template< typename N, typename Sequence > struct algorithm
template< typename Sequence, typename N > struct algorithm
{
typedef typename advance<
typename begin<Sequence>::type

View File

@ -17,7 +17,10 @@
#ifndef BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED
#define BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED
#if defined(__BORLANDC__) || defined(BOOST_MSVC) && BOOST_MSVC < 1300
#include "boost/config.hpp"
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(BOOST_MSVC) && BOOST_MSVC < 1300
# include "boost/mpl/bool_c.hpp"

View File

@ -1,13 +1,28 @@
// Copyright David Abrahams 2002. Permission to copy, use,
// modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
#ifndef BIND_DWA2002910_HPP
# define BIND_DWA2002910_HPP
//-----------------------------------------------------------------------------
// boost mpl/aux_/config/bind.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// 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.
# include <boost/config.hpp>
# if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
# define BOOST_MPL_NO_BIND_TEMPLATE
# endif
#endif // BIND_DWA2002910_HPP
#ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
#include "boost/config.hpp"
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_MPL_NO_BIND_TEMPLATE)
# define BOOST_MPL_NO_BIND_TEMPLATE
#endif
#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED

View File

@ -22,16 +22,30 @@
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
# define BOOST_MPL_COMPILER_DIR msvc60
#elif defined(BOOST_MSVC) && BOOST_MSVC == 1300
# define BOOST_MPL_COMPILER_DIR msvc70
#elif defined(__GNUC__)
# define BOOST_MPL_COMPILER_DIR gcc
#elif defined(__BORLANDC__)
# define BOOST_MPL_COMPILER_DIR bcc
#elif defined(__MWERKS__) && __MWERKS__ <= 0x3001
# define BOOST_MPL_COMPILER_DIR mwcw
#elif defined(__BORLANDC__)
# if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_COMPILER_DIR bcc551
# else
# define BOOST_MPL_COMPILER_DIR bcc
# endif
#elif defined(__MWERKS__)
# if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_COMPILER_DIR mwcw
# else
# define BOOST_MPL_COMPILER_DIR plain
# endif
#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# define BOOST_MPL_COMPILER_DIR no_ctps
#else
# define BOOST_MPL_COMPILER_DIR plain
#endif

View File

@ -0,0 +1,27 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/config/ctps.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// 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.
#ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
#include "boost/config.hpp"
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION)
# define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION
#endif
#endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED

View File

@ -17,13 +17,17 @@
#ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
#include "boost/config.hpp"
// GCC and EDG-based compilers incorrectly reject the following code:
// template< typename T, T n > struct a;
// template< typename T > struct b;
// template< typename T, T n > struct b< a<T,n> > {};
#if defined(__EDG__) \
|| defined(__GNUC__)
#if defined(__EDG__) && (__EDG_VERSION__ <= 300 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION)
# define BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION
#endif

View File

@ -21,12 +21,21 @@
// MWCW 7.x-8.0 "losts" default template parameters of nested class
// templates when their owner classes are passed as arguments to other
// templates; Borland "forgets" them from the very beginning (if the owner
// class is a class template).
#if defined(__MWERKS__) && __MWERKS__ <= 0x3001 \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
// templates; Borland 5.5.1 "forgets" them from the very beginning (if
// the owner class is a class template), and Borland 5.6 isn't even
// able to compile a definition of nested class template with DTP
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 && \
(__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
#endif
#if defined(__MWERKS__) && __MWERKS__ <= 0x3001 \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \
&& !defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
#endif
#endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED

View File

@ -19,9 +19,12 @@
#include "boost/config.hpp"
// flag for MSVC 6.5's so-called "early template instantiation bug"
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
# define BOOST_MPL_MSVC_ETI_BUG
// flags for MSVC 6.5's so-called "early template instantiation bug"
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
# if BOOST_MSVC < 1300
# define BOOST_MPL_MSVC_ETI_BUG
# endif
# define BOOST_MPL_MSVC_70_ETI_BUG
#endif
#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED

View File

@ -19,7 +19,8 @@
#include "boost/config.hpp"
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 \
&& !defined(BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY)
# define BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY
#endif

View File

@ -1,5 +1,5 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/config/lambda_support.hpp header file
// boost mpl/aux_/config/lambda.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
@ -14,8 +14,8 @@
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED
#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED
#include "boost/mpl/aux_/config/ttp.hpp"
#include "boost/config.hpp"
@ -24,10 +24,12 @@
// template template parameters _and_ partial specialization
#if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
|| defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|| defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
# define BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
#endif
//#define BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT
//#define BOOST_MPL_NO_LAMBDA_HEURISTIC
#endif // BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED
#endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED

View File

@ -17,7 +17,11 @@
#ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
#if defined(__BORLANDC__) || defined(__MWERKS__) && __MWERKS__ < 0x3001
#include "boost/config.hpp"
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__MWERKS__) && __MWERKS__ < 0x3001 \
&& !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION)
# define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION
#endif

View File

@ -0,0 +1,30 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/config/preprocessor.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2000-02
// 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.
#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
#include "boost/config.hpp"
#if defined(__MWERKS__) && (__MWERKS__ <= 0x3002 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG))
# define BOOST_MPL_BROKEN_PP_MACRO_EXPANSION
#endif
//#define BOOST_MPL_NO_OWN_PP_PRIMITIVES
#endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED

View File

@ -19,11 +19,15 @@
#include "boost/config.hpp"
#if defined(BOOST_NO_TEMPLATE_TEMPLATES)
#if defined(BOOST_NO_TEMPLATE_TEMPLATES) \
&& (!defined(BOOST_MSVC) || BOOST_MSVC < 1300)
# define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS
#endif
#if defined(__GNUC__) && !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
#if defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
&& !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
#endif

View File

@ -45,7 +45,7 @@
# include "boost/preprocessor/repeat.hpp"
# include "boost/preprocessor/inc.hpp"
# define AUX_COUNT_ARGS_REPEAT BOOST_PP_REPEAT_1ST
# define AUX_COUNT_ARGS_REPEAT BOOST_PP_REPEAT_1
# define AUX_COUNT_ARGS_PARAMS(param) \
BOOST_PP_ENUM_SHIFTED_PARAMS( \
BOOST_PP_INC(BOOST_MPL_AUX_COUNT_ARGS_ARITY) \

View File

@ -20,7 +20,7 @@
# include "boost/mpl/aux_/apply.hpp"
# include "boost/mpl/aux_/next.hpp"
# include "boost/config.hpp"
# include "boost/mpl/aux_/config/ctps.hpp"
# include "boost/mpl/limits/unrolling.hpp"
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
@ -33,7 +33,7 @@
// local macros, #undef-ined at the end of the header
# define AUX_ITER_FOLD_FORWARD_STEP(i, unused) \
# define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \
typedef typename BOOST_MPL_AUX_APPLY2( \
ForwardOp \
, BOOST_PP_CAT(fwd_state,i) \
@ -51,7 +51,7 @@
)::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(i)); \
/**/
# define AUX_ITER_FOLD_BACKWARD_STEP(i, j) \
# define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, j) \
AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
BOOST_PP_SUB_D(1,j,i) \
) \
@ -84,7 +84,8 @@ template<
>
struct AUX_FOLD_IMPL_NAME;
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION)
# define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_backward_impl_body.hpp"))
@ -265,6 +266,15 @@ struct AUX_FOLD_CHUNK_NAME<-1>
typedef typename res_::state state;
typedef typename res_::iterator iterator;
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
//: ETI workaround
template<> struct result_<int,int,int,int,int>
{
typedef int state;
typedef int iterator;
};
#endif
};
template<
@ -326,7 +336,8 @@ struct AUX_FOLD_IMPL_NAME
#else
#define i BOOST_PP_FRAME_ITERATION(1)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename First
@ -393,11 +404,14 @@ struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)>
typedef BOOST_PP_CAT(iter,i) iterator;
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
//: ETI workaround
template<> struct result_<int,int,int,int,int>
{
typedef int state;
typedef int iterator;
};
#endif
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

View File

@ -19,6 +19,7 @@
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/next.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#include "boost/config.hpp"
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \

View File

@ -31,7 +31,7 @@
// local macros, #undef-ined at the end of the header
# define AUX_ITER_FOLD_STEP(i, unused) \
# define AUX_ITER_FOLD_STEP(unused, i, unused2) \
typedef typename BOOST_MPL_AUX_APPLY2( \
ForwardOp \
, BOOST_PP_CAT(state,i) \
@ -252,6 +252,15 @@ struct AUX_FOLD_CHUNK_NAME<-1>
typedef typename res_::state state;
typedef typename res_::iterator iterator;
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
//: ETI workaround
template<> struct result_<int,int,int,int>
{
typedef int state;
typedef int iterator;
};
#endif
};
template<
@ -353,11 +362,14 @@ struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)>
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) iterator;
};
#if defined(BOOST_MPL_MSVC_ETI_BUG)
//: ETI workaround
template<> struct result_<int,int,int,int>
{
typedef int state;
typedef int iterator;
};
#endif
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

View File

@ -203,7 +203,7 @@ struct lambda_impl< bind2nd<F,T>, Protect AUX_ARITY_PARAM(-1) >
#else // BOOST_MPL_NO_LAMBDA_HEURISTIC
# define AUX_LAMBDA_RESULT(i, T) \
# define AUX_LAMBDA_RESULT(unused, i, T) \
BOOST_PP_COMMA_IF(i) \
typename BOOST_PP_CAT(T, BOOST_PP_INC(i))::type \
/**/
@ -249,12 +249,12 @@ struct BOOST_PP_CAT(le_result,i)< true,true,F,AUX_LAMBDA_PARAMS(i, L) >
} // namespace aux
# define AUX_LAMBDA_INVOCATION(i, T) \
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
typedef lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) > \
BOOST_PP_CAT(l,BOOST_PP_INC(i)); \
/**/
# define AUX_IS_LAMBDA_EXPR(i, unused) \
# define AUX_IS_LAMBDA_EXPR(unused, i, unused2) \
BOOST_PP_COMMA_IF(i) \
BOOST_PP_CAT(l,BOOST_PP_INC(i))::is_le::value \
/**/
@ -322,7 +322,7 @@ template<
>
struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_LAMBDA_IMPL_ARITY >
{
# define AUX_LAMBDA_INVOCATION(i, T) \
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
BOOST_PP_COMMA_IF(i) \
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) >::type \
/**/

View File

@ -126,7 +126,7 @@ struct iter_fold_if_backward_step
// local macros, #undef-ined at the end of the header
# define AUX_ITER_FOLD_FORWARD_STEP(i, unused) \
# define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \
typedef iter_fold_if_forward_step< \
typename BOOST_PP_CAT(forward_step,i)::iterator \
, typename BOOST_PP_CAT(forward_step,i)::state \
@ -144,7 +144,7 @@ struct iter_fold_if_backward_step
> BOOST_PP_CAT(backward_step,BOOST_PP_DEC(i)); \
/**/
# define AUX_ITER_FOLD_BACKWARD_STEP(i, unused) \
# define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, unused2) \
AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
BOOST_PP_SUB_D(1,BOOST_MPL_UNROLLING_LIMIT,i) \
) \
@ -170,7 +170,7 @@ struct iter_fold_if_impl
{
private:
typedef iter_fold_if_null_step<Iterator,State> forward_step0;
BOOST_PP_REPEAT_1ST(
BOOST_PP_REPEAT_1(
BOOST_MPL_UNROLLING_LIMIT
, AUX_ITER_FOLD_FORWARD_STEP
, unused
@ -192,7 +192,7 @@ struct iter_fold_if_impl
>
>::type AUX_LAST_BACKWARD_STEP;
BOOST_PP_REPEAT_1ST(
BOOST_PP_REPEAT_1(
BOOST_MPL_UNROLLING_LIMIT
, AUX_ITER_FOLD_BACKWARD_STEP
, unused

View File

@ -17,7 +17,7 @@
#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
#define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/ttp.hpp"
#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param)

View File

@ -17,7 +17,7 @@
#ifndef BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED
#define BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
# define BOOST_MPL_AUX_IS_LAMBDA_EXPR(value) /**/

View File

@ -97,7 +97,7 @@ struct lambda
#else
#define i BOOST_PP_FRAME_ITERATION(1)
# define AUX_LAMBDA_INVOCATION(i, T) \
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
, typename lambda< \
typename f_::BOOST_PP_CAT(arg,BOOST_PP_INC(i)) \
, false \

View File

@ -20,7 +20,7 @@
#include "boost/mpl/lambda_fwd.hpp"
#include "boost/mpl/aux_/preprocessor/params.hpp"
#include "boost/mpl/aux_/lambda_arity_param.hpp"
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)

View File

@ -17,7 +17,7 @@
#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
#define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)

View File

@ -17,7 +17,11 @@
#ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
#define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
#if defined(__GNUC__) || defined(__BORLANDC__)
#include "boost/config.hpp"
#if defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \
|| !defined(BOOST_STRICT_CONFIG)) \
|| defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
namespace boost { namespace mpl { namespace aux {

View File

@ -17,6 +17,7 @@
#ifndef BOOST_MPL_AUX_SEQUENCE_TAG_HPP_INCLUDED
#define BOOST_MPL_AUX_SEQUENCE_TAG_HPP_INCLUDED
//#include "boost/mpl/aux_/config/internal.hpp"
#include "boost/config.hpp"
#if defined(BOOST_MPL_INTERNAL_USE_SEQUENCE_TAG) || \

View File

@ -19,7 +19,7 @@
#include "boost/mpl/void.hpp"
#include "boost/mpl/aux_/preprocessor/params.hpp"
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)

View File

@ -17,7 +17,9 @@
#ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
#define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
#if defined(__BORLANDC__)
#include "boost/config.hpp"
#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
namespace boost { namespace mpl { namespace aux {
@ -29,7 +31,7 @@ struct value_wknd
}}} // namespace boost::mpl::aux
# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd<C>
# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C >
#else

View File

@ -20,13 +20,13 @@
#include "boost/mpl/void.hpp"
#include "boost/mpl/aux_/arity.hpp"
#include "boost/mpl/aux_/template_arity_fwd.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/config/ttp.hpp"
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/overload_resolution.hpp"
#include "boost/mpl/aux_/preprocessor/params.hpp"
#include "boost/mpl/aux_/preprocessor/enum.hpp"
#include "boost/mpl/aux_/preprocessor/def_params_tail.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/config/ttp.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#include "boost/mpl/aux_/config/overload_resolution.hpp"
#include "boost/config.hpp"
@ -34,7 +34,7 @@
BOOST_MPL_PP_ENUM(i, void_) \
/**/
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \
namespace aux { \
template< int N > \
@ -49,28 +49,17 @@ struct arity< \
}; \
} \
/**/
# define BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
template<> \
struct name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \
{ \
template< \
BOOST_MPL_PP_PARAMS(BOOST_MPL_METAFUNCTION_MAX_ARITY, typename T) \
> \
struct apply \
: name< BOOST_MPL_PP_PARAMS(i, T) > \
{ \
}; \
}; \
/**/
#else
# define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) /**/
# define BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
#endif
#define BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
template<> \
struct name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \
{ \
template< \
BOOST_MPL_PP_PARAMS(i, typename T) \
BOOST_MPL_PP_DEF_PARAMS_TAIL(i, typename T) \
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, void_) \
> \
struct apply \
: name< BOOST_MPL_PP_PARAMS(i, T) > \
@ -78,7 +67,6 @@ struct name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \
}; \
}; \
/**/
#endif
#if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) || \
defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) && \
@ -90,7 +78,7 @@ struct template_arity< \
name< BOOST_MPL_PP_PARAMS(j, T) > \
> \
{ \
BOOST_STATIC_CONSTANT(int, value = j ); \
BOOST_STATIC_CONSTANT(int, value = j); \
}; \
\
template<> \
@ -98,7 +86,7 @@ struct template_arity< \
name< BOOST_MPL_PP_ENUM(i, void_) > \
> \
{ \
BOOST_STATIC_CONSTANT(int, value = j ); \
BOOST_STATIC_CONSTANT(int, value = -1); \
}; \
} \
/**/
@ -109,11 +97,6 @@ struct template_arity< \
#define BOOST_MPL_AUX_VOID_SPEC_PARAM(param) param = void_
// agurt, 16/sep/02: temporary fix for VisualAge C++
#if defined(__IBMCPP__)
# define BOOST_MPL_AUX_VOID_SPEC(i, name) /**/
# define BOOST_MPL_AUX_VOID_SPEC_EXT(i, j, name) /**/
#else
#define BOOST_MPL_AUX_VOID_SPEC(i, name) \
BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \
@ -125,6 +108,5 @@ BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \
BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \
/**/
#endif
#endif // BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED

View File

@ -23,14 +23,14 @@
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/config/bind.hpp"
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/placeholder.hpp"
# include "boost/mpl/void.hpp"
# include "boost/mpl/protect.hpp"
# include "boost/mpl/limits/arity.hpp"
# include "boost/mpl/aux_/arity.hpp"
# include "boost/mpl/aux_/arity_spec.hpp"
# include "boost/mpl/aux_/type_wrapper.hpp"
# include "boost/mpl/aux_/yes_no.hpp"
# include "boost/type_traits/same_traits.hpp"
@ -101,6 +101,16 @@ namespace mpl {
) \
/**/
#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define AUX_BIND_NESTED_DEFAULT_PARAMS(param, value) \
AUX_BIND_DEFAULT_PARAMS(param, value) \
/**/
#else
# define AUX_BIND_NESTED_DEFAULT_PARAMS(param, value) \
AUX_BIND_PARAMS(param) \
/**/
#endif
namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
@ -208,11 +218,13 @@ struct replace_unnamed_arg
} // namespace aux
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
// forward declaration
template<
typename F, AUX_BIND_DEFAULT_PARAMS(typename T, void_)
>
struct bind;
#endif
// fwd, for 'resolve_bind_arg'/'is_bind_template' specializations
template< typename F, typename T > struct bind1st;
@ -229,6 +241,7 @@ struct resolve_bind_arg< arg<N>,AUX_BIND_PARAMS(U) >
typedef typename AUX_APPLY((arg<N>, AUX_BIND_PARAMS(U)))::type type;
};
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
template<
typename F, AUX_BIND_PARAMS(typename T), AUX_BIND_PARAMS(typename U)
>
@ -237,6 +250,7 @@ struct resolve_bind_arg< bind<F,AUX_BIND_PARAMS(T)>,AUX_BIND_PARAMS(U) >
typedef bind<F,AUX_BIND_PARAMS(T)> f_;
typedef typename AUX_APPLY((f_, AUX_BIND_PARAMS(U)))::type type;
};
#endif
template<
typename F, typename T, AUX_BIND_PARAMS(typename U)
@ -268,10 +282,12 @@ template< typename T > aux::no_tag is_bind_helper(protect<T>*);
// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload
// in case if we use 'aux::type_wrapper< bind<...> >' here, and all
// 'bind' instantiations form a complete type anyway
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
template<
typename F, AUX_BIND_PARAMS(typename T)
>
aux::yes_tag is_bind_helper(bind<F,AUX_BIND_PARAMS(T)>*);
#endif
template< int N >
aux::yes_tag is_bind_helper(arg<N>*);
@ -289,46 +305,25 @@ template< typename T > struct is_bind_template
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
// MWCW/Borland workaround
template<
typename F, AUX_BIND_PARAMS(typename T), int N
>
struct arity< bind<F,AUX_BIND_PARAMS(T)>,N >
{
BOOST_STATIC_CONSTANT(int
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
);
};
template< typename F, typename T, int N >
struct arity< bind1st<F,T>,N >
{
BOOST_STATIC_CONSTANT(int
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
);
};
template< typename F, typename T, int N >
struct arity< bind2nd<F,T>,N >
{
BOOST_STATIC_CONSTANT(int
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
);
};
#endif // BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES
} // namespace aux
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
BOOST_MPL_AUX_ARITY_SPEC(
BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY)
, bind
)
#endif
BOOST_MPL_AUX_ARITY_SPEC(2,bind1st)
BOOST_MPL_AUX_ARITY_SPEC(2,bind2nd)
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/bind.hpp"))
#include BOOST_PP_ITERATE()
// real C++ version is already taken care of
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !defined(BOOST_MPL_NO_BIND_TEMPLATE)
&& !defined(BOOST_MPL_NO_BIND_TEMPLATE)
namespace aux {
// apply_count_args
@ -350,14 +345,14 @@ struct bind
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// && !defined(BOOST_MPL_NO_BIND_TEMPLATE)
// bind1st/bind2nd, lightweight, for simple cases/backward compatibility
template< typename F, typename T >
struct bind1st
{
template<
typename U BOOST_MPL_PP_DEF_PARAMS_TAIL(1, typename U)
typename U
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename U, void_)
>
struct apply
: BOOST_MPL_AUX_APPLY2(F,T,U)
@ -369,7 +364,8 @@ template< typename F, typename T >
struct bind2nd
{
template<
typename U BOOST_MPL_PP_DEF_PARAMS_TAIL(1, typename U)
typename U
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename U, void_)
>
struct apply
: BOOST_MPL_AUX_APPLY2(F,U,T)
@ -377,6 +373,7 @@ struct bind2nd
};
};
# undef AUX_BIND_NESTED_DEFAULT_PARAMS
# undef AUX_BIND_N_SPEC_PARAMS
# undef AUX_BIND_N_PARAMS
# undef AUX_BIND_DEFAULT_PARAMS
@ -401,7 +398,7 @@ template<
struct BOOST_PP_CAT(bind,i)
{
template<
AUX_BIND_DEFAULT_PARAMS(typename U, void_)
AUX_BIND_NESTED_DEFAULT_PARAMS(typename U, void_)
>
struct apply
{
@ -418,8 +415,10 @@ struct BOOST_PP_CAT(bind,i)
# endif // BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT
# if i > 0
# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i, "boost/mpl/bind.hpp"))
# include BOOST_PP_ITERATE()
# endif
public:
typedef typename BOOST_MPL_AUX_APPLY(
@ -455,27 +454,14 @@ is_bind_helper(BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T)>*);
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// MWCW/Borland workaround
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
template<
typename F AUX_BIND_N_PARAMS(i, typename T), int N
>
struct arity<
BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T)>, N
>
{
BOOST_STATIC_CONSTANT(int
, value = BOOST_MPL_METAFUNCTION_MAX_ARITY
);
};
#endif
} // namespace aux
BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i), BOOST_PP_CAT(bind,i))
# if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if i == BOOST_MPL_METAFUNCTION_MAX_ARITY
//: primary template (not a specialization!)
@ -518,6 +504,7 @@ struct bind_impl_chooser<i>
} // namespace aux
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif // BOOST_MPL_NO_BIND_TEMPLATE
# undef i

View File

@ -58,12 +58,13 @@ template<
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last)
>
struct distance
: aux::distance_impl<
{
// agurt, 29/sep/02: Borland doesn't like inheritance here
typedef typename aux::distance_impl<
typename BOOST_MPL_AUX_ITERATOR_CATEGORY(First)
, First
, Last
>
{
>::type type;
};
#else

View File

@ -30,13 +30,22 @@ struct int_c
typedef int value_type;
// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
// while some other don't like 'value + 1' (Borland)
#if !defined(__BORLANDC__)
typedef int_c<value + 1> next;
typedef int_c<value - 1> prior;
// while some other don't like 'value + 1' (Borland), and some don't like
// either
#if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243
private:
BOOST_STATIC_CONSTANT(T, next_value = (N + 1));
BOOST_STATIC_CONSTANT(T, prior_value = (N - 1));
public:
typedef int_c<next_value> next;
typedef int_c<prior_value> prior;
#elif defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG))
typedef int_c<(N + 1)> next;
typedef int_c<(N - 1)> prior;
#else
typedef int_c<N + 1> next;
typedef int_c<N - 1> prior;
typedef int_c<(value + 1)> next;
typedef int_c<(value - 1)> prior;
#endif
operator int() const { return this->value; }

View File

@ -30,7 +30,8 @@ struct integral_c
typedef T value_type;
// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
// while some other don't like 'value + 1' (Borland)
// while some other don't like 'value + 1' (Borland), and some don't like
// either
#if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243
private:
BOOST_STATIC_CONSTANT(T, next_value = (N + 1));
@ -38,7 +39,8 @@ struct integral_c
public:
typedef integral_c<T, next_value> next;
typedef integral_c<T, prior_value> prior;
#elif defined(__BORLANDC__) || defined(__IBMCPP__)
#elif defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG))
typedef integral_c<T, (N + 1)> next;
typedef integral_c<T, (N - 1)> prior;
#else
@ -54,8 +56,7 @@ struct integral_c
};
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& (!defined(BOOST_MSVC) || BOOST_MSVC != 1301) \
&& !defined(__BORLANDC__)
&& !defined(__BORLANDC__) || __BORLANDC__ > 0x551
// 'bool' constant doesn't have 'next'/'prior' members
template< bool C >
struct integral_c<bool, C>

View File

@ -17,7 +17,7 @@
#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED
#define BOOST_MPL_LAMBDA_HPP_INCLUDED
#include "boost/mpl/aux_/config/lambda_support.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
# include "boost/mpl/aux_/full_lambda.hpp"

View File

@ -58,7 +58,7 @@ namespace mpl {
#else
#define i BOOST_PP_FRAME_ITERATION(1)
#define MPL_AUX_ARG_TYPEDEF(i, T) \
#define MPL_AUX_ARG_TYPEDEF(unused, i, T) \
typedef BOOST_PP_CAT(T, BOOST_PP_INC(i)) \
BOOST_PP_CAT(arg, BOOST_PP_INC(i)); \
/**/

View File

@ -25,6 +25,7 @@
#include "boost/mpl/apply_if.hpp"
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/deref_wknd.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
namespace boost {
@ -69,9 +70,9 @@ struct lower_bound_step
, typename BOOST_MPL_AUX_DEREF_WNKD(middle_)
, T
)::type
, typename lower_bound_step<Distance - offset_::value - 1>
, typename lower_bound_step< Distance - BOOST_MPL_AUX_VALUE_WKND(offset_)::value - 1 >
::template result_< Predicate,T,next<middle_> >
, typename lower_bound_step<offset_::value>
, typename lower_bound_step< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
::template result_< Predicate,T,DeferredIterator >
>::type type;
};
@ -90,7 +91,7 @@ struct lower_bound
typedef typename lambda<Predicate>::type pred_;
public:
typedef typename aux::lower_bound_step< size<Sequence>::value >
typedef typename aux::lower_bound_step< BOOST_MPL_AUX_VALUE_WKND(size<Sequence>)::value >
::template result_< pred_,T,begin<Sequence> >::type type;
};

View File

@ -60,11 +60,6 @@ using boost::mpl::_;
} // namespace mpl
} // namespace boost
#if !defined(_) || defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT)
//: injecting the unnumbered placeholder into global namespace
using boost::mpl::_;
#endif
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
#endif // BOOST_MPL_PLACEHOLDER_HPP_INCLUDED

View File

@ -29,14 +29,14 @@ struct protect : T
typedef protect type;
};
#if defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
namespace aux {
template< typename T, int N >
struct arity< protect<T>, N >
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
namespace aux {
template< int N, typename T >
struct arity< protect<T>, N >
: arity<T,N>
{
{
};
}
} // namespace aux
#endif
} // namespace mpl

View File

@ -28,7 +28,7 @@ template< typename T1 >
struct same_as
{
template< typename T2 > struct apply
#if !defined(__BORLANDC__)
#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551 && defined(BOOST_STRICT_CONFIG))
: is_same<T1,T2>
{
#else
@ -42,7 +42,7 @@ template< typename T1 >
struct not_same_as
{
template< typename T2 > struct apply
#if !defined(__BORLANDC__)
#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x51 && defined(BOOST_STRICT_CONFIG))
: logical_not< is_same<T1,T2> >
{
#else

View File

@ -0,0 +1,43 @@
//-----------------------------------------------------------------------------
// boost mpl/sizeof.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
// 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.
#ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED
#define BOOST_MPL_SIZEOF_HPP_INCLUDED
#include "boost/mpl/size_t_c.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include <cstddef> // for std::size_t
namespace boost {
namespace mpl {
template<
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T)
>
struct sizeof_
: size_t_c<sizeof(T)>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,sizeof_,(T))
};
BOOST_MPL_AUX_VOID_SPEC(1, sizeof_)
} // namespace mpl
} // namespace boost
#endif // BOOST_MPL_SIZEOF_HPP_INCLUDED

View File

@ -30,6 +30,7 @@
#include "boost/mpl/void.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_spec.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#include "boost/type_traits/is_same.hpp"
namespace boost {
@ -75,9 +76,13 @@ struct unique
>::type fold_result_;
public:
#if defined(BOOST_MPL_MSVC_ETI_BUG)
// MSVC6.5 forces us to use 'select1st<fold_result_>::type' instead of
// simple 'fold_result_::first' here
typedef typename select1st<fold_result_>::type type;
#else
typedef typename fold_result_::first type;
#endif
};
BOOST_MPL_AUX_VOID_SPEC(1, unique)

View File

@ -26,6 +26,7 @@
#include "boost/mpl/apply.hpp"
#include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/deref_wknd.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
namespace boost {
@ -70,9 +71,9 @@ struct upper_bound_step
, T
, typename BOOST_MPL_AUX_DEREF_WNKD(middle_)
)::type
, typename upper_bound_step<offset_::value>
, typename upper_bound_step< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
::template result_< Predicate,T,DeferredIterator >
, typename upper_bound_step<Distance - offset_::value - 1>
, typename upper_bound_step< Distance - BOOST_MPL_AUX_VALUE_WKND(offset_)::value - 1 >
::template result_< Predicate,T,next<middle_> >
>::type type;
};
@ -91,7 +92,7 @@ struct upper_bound
typedef typename lambda<Predicate>::type pred_;
public:
typedef typename aux::upper_bound_step< size<Sequence>::value >
typedef typename aux::upper_bound_step< BOOST_MPL_AUX_VALUE_WKND(size<Sequence>)::value >
::template result_< pred_,T,begin<Sequence> >::type type;
};

View File

@ -17,18 +17,31 @@
#ifndef BOOST_MPL_VOID_HPP_INCLUDED
#define BOOST_MPL_VOID_HPP_INCLUDED
#include "boost/mpl/bool_c.hpp"
#include "boost/config.hpp"
namespace boost {
namespace mpl {
struct void_;
namespace aux {
template< typename > struct reject_if_void_ { enum { value = 1 }; };
template<> struct reject_if_void_<void_>; // never defined
template< typename T >
struct is_void_
: false_c
{
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
using false_c::value;
#endif
};
template< typename > struct reject_if_not_void_; // never defined
template<> struct reject_if_not_void_<void_> { enum { value = 1 }; };
}
template<>
struct is_void_<void_>
: true_c
{
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
using true_c::value;
#endif
};
} // namespace mpl
} // namespace boost