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 #define BOOST_MPL_ALWAYS_HPP_INCLUDED
#include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" #include "boost/mpl/aux_/preprocessor/def_params_tail.hpp"
#include "boost/mpl/limits/arity.hpp"
#include "boost/mpl/void.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_/lambda_spec.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/config.hpp"
namespace boost { namespace boost {
namespace mpl { namespace mpl {
@@ -33,7 +30,7 @@ struct always
{ {
template< template<
typename T typename T
BOOST_MPL_PP_DEF_PARAMS_TAIL(1, typename T) BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, void_)
> >
struct apply 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) BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,always)
} // namespace mpl } // namespace mpl

View File

@@ -46,7 +46,8 @@
# include "boost/mpl/aux_/preprocessor/add.hpp" # include "boost/mpl/aux_/preprocessor/add.hpp"
# include "boost/mpl/aux_/preprocessor/sub.hpp" # include "boost/mpl/aux_/preprocessor/sub.hpp"
# include "boost/mpl/aux_/config/dtp.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/comma_if.hpp"
# include "boost/preprocessor/inc.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; 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 // MWCW/Borland version
namespace aux { namespace aux {

View File

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

View File

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

View File

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

View File

@@ -28,23 +28,23 @@ namespace boost {
namespace mpl { namespace mpl {
template< 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 struct at
: at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > : 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< template<
long N typename Sequence
, typename Sequence , long N
> >
struct at_c struct at_c
: at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > : 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 { namespace mpl {
template< typename Tag > struct at_traits; template< typename Tag > struct at_traits;
template< typename N, typename Sequence > struct at; template< typename Sequence, typename N > struct at;
} // namespace mpl } // namespace mpl
} // namespace boost } // namespace boost

View File

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

View File

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

View File

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

View File

@@ -19,7 +19,7 @@
#include "boost/mpl/aux_/config/dtp.hpp" #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" # include "boost/config.hpp"
@@ -40,6 +40,6 @@ struct arity
} // namespace mpl } // namespace mpl
} // namespace boost } // 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 #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 > template< typename Tag >
struct at_traits struct at_traits
{ {
template< typename N, typename Sequence > struct algorithm template< typename Sequence, typename N > struct algorithm
{ {
typedef typename advance< typedef typename advance<
typename begin<Sequence>::type typename begin<Sequence>::type

View File

@@ -17,7 +17,10 @@
#ifndef BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED #ifndef BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED
#define 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" # 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 // boost mpl/aux_/config/bind.hpp header file
// copyright notice appears in all copies. This software is provided // See http://www.boost.org for updates, documentation, and revision history.
// "as is" without express or implied warranty, and with no claim as //-----------------------------------------------------------------------------
// to its suitability for any purpose. //
#ifndef BIND_DWA2002910_HPP // Copyright (c) 2002
# define BIND_DWA2002910_HPP // 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> #ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED
# if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 #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 # define BOOST_MPL_NO_BIND_TEMPLATE
# endif #endif
#endif // BIND_DWA2002910_HPP
#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED

View File

@@ -22,16 +22,30 @@
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 #if defined(BOOST_MSVC) && BOOST_MSVC < 1300
# define BOOST_MPL_COMPILER_DIR msvc60 # define BOOST_MPL_COMPILER_DIR msvc60
#elif defined(BOOST_MSVC) && BOOST_MSVC == 1300 #elif defined(BOOST_MSVC) && BOOST_MSVC == 1300
# define BOOST_MPL_COMPILER_DIR msvc70 # define BOOST_MPL_COMPILER_DIR msvc70
#elif defined(__GNUC__) #elif defined(__GNUC__)
# define BOOST_MPL_COMPILER_DIR gcc # define BOOST_MPL_COMPILER_DIR gcc
#elif defined(__BORLANDC__) #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 # define BOOST_MPL_COMPILER_DIR bcc
#elif defined(__MWERKS__) && __MWERKS__ <= 0x3001 # endif
#elif defined(__MWERKS__)
# if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_COMPILER_DIR mwcw # define BOOST_MPL_COMPILER_DIR mwcw
# else
# define BOOST_MPL_COMPILER_DIR plain
# endif
#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# define BOOST_MPL_COMPILER_DIR no_ctps # define BOOST_MPL_COMPILER_DIR no_ctps
#else #else
# define BOOST_MPL_COMPILER_DIR plain # define BOOST_MPL_COMPILER_DIR plain
#endif #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 #ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED
#define 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: // GCC and EDG-based compilers incorrectly reject the following code:
// template< typename T, T n > struct a; // template< typename T, T n > struct a;
// template< typename T > struct b; // template< typename T > struct b;
// template< typename T, T n > struct b< a<T,n> > {}; // template< typename T, T n > struct b< a<T,n> > {};
#if defined(__EDG__) \ #if defined(__EDG__) && (__EDG_VERSION__ <= 300 || !defined(BOOST_STRICT_CONFIG)) \
|| defined(__GNUC__) || 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 # define BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION
#endif #endif

View File

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

View File

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

View File

@@ -19,7 +19,8 @@
#include "boost/config.hpp" #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 # define BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY
#endif #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. // 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" // suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty. // without express or implied warranty.
#ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED #ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_LAMBDA_SUPPORT_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED
#include "boost/mpl/aux_/config/ttp.hpp" #include "boost/mpl/aux_/config/ttp.hpp"
#include "boost/config.hpp" #include "boost/config.hpp"
@@ -24,10 +24,12 @@
// template template parameters _and_ partial specialization // template template parameters _and_ partial specialization
#if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ #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 # define BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
#endif #endif
//#define BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT //#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 #ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED
#define 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 # define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION
#endif #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" #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 # define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS
#endif #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 # define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
#endif #endif

View File

@@ -45,7 +45,7 @@
# include "boost/preprocessor/repeat.hpp" # include "boost/preprocessor/repeat.hpp"
# include "boost/preprocessor/inc.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) \ # define AUX_COUNT_ARGS_PARAMS(param) \
BOOST_PP_ENUM_SHIFTED_PARAMS( \ BOOST_PP_ENUM_SHIFTED_PARAMS( \
BOOST_PP_INC(BOOST_MPL_AUX_COUNT_ARGS_ARITY) \ 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_/apply.hpp"
# include "boost/mpl/aux_/next.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/limits/unrolling.hpp"
# include "boost/mpl/aux_/preprocessor/repeat.hpp" # include "boost/mpl/aux_/preprocessor/repeat.hpp"
@@ -33,7 +33,7 @@
// local macros, #undef-ined at the end of the header // 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( \ typedef typename BOOST_MPL_AUX_APPLY2( \
ForwardOp \ ForwardOp \
, BOOST_PP_CAT(fwd_state,i) \ , BOOST_PP_CAT(fwd_state,i) \
@@ -51,7 +51,7 @@
)::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(i)); \ )::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( \ AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
BOOST_PP_SUB_D(1,j,i) \ BOOST_PP_SUB_D(1,j,i) \
) \ ) \
@@ -84,7 +84,8 @@ template<
> >
struct AUX_FOLD_IMPL_NAME; 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 \ # define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_backward_impl_body.hpp")) (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_::state state;
typedef typename res_::iterator iterator; 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< template<
@@ -326,7 +336,8 @@ struct AUX_FOLD_IMPL_NAME
#else #else
#define i BOOST_PP_FRAME_ITERATION(1) #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< template<
typename First typename First
@@ -393,11 +404,14 @@ struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)>
typedef BOOST_PP_CAT(iter,i) iterator; typedef BOOST_PP_CAT(iter,i) iterator;
}; };
#if defined(BOOST_MPL_MSVC_ETI_BUG)
//: ETI workaround
template<> struct result_<int,int,int,int,int> template<> struct result_<int,int,int,int,int>
{ {
typedef int state; typedef int state;
typedef int iterator; typedef int iterator;
}; };
#endif
}; };
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

View File

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

View File

@@ -31,7 +31,7 @@
// local macros, #undef-ined at the end of the header // 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( \ typedef typename BOOST_MPL_AUX_APPLY2( \
ForwardOp \ ForwardOp \
, BOOST_PP_CAT(state,i) \ , BOOST_PP_CAT(state,i) \
@@ -252,6 +252,15 @@ struct AUX_FOLD_CHUNK_NAME<-1>
typedef typename res_::state state; typedef typename res_::state state;
typedef typename res_::iterator iterator; 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< 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; 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> template<> struct result_<int,int,int,int>
{ {
typedef int state; typedef int state;
typedef int iterator; typedef int iterator;
}; };
#endif
}; };
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #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 #else // BOOST_MPL_NO_LAMBDA_HEURISTIC
# define AUX_LAMBDA_RESULT(i, T) \ # define AUX_LAMBDA_RESULT(unused, i, T) \
BOOST_PP_COMMA_IF(i) \ BOOST_PP_COMMA_IF(i) \
typename BOOST_PP_CAT(T, BOOST_PP_INC(i))::type \ 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 } // 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)) > \ typedef lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) > \
BOOST_PP_CAT(l,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_COMMA_IF(i) \
BOOST_PP_CAT(l,BOOST_PP_INC(i))::is_le::value \ 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 > 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) \ BOOST_PP_COMMA_IF(i) \
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) >::type \ 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 // 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< \ typedef iter_fold_if_forward_step< \
typename BOOST_PP_CAT(forward_step,i)::iterator \ typename BOOST_PP_CAT(forward_step,i)::iterator \
, typename BOOST_PP_CAT(forward_step,i)::state \ , 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)); \ > 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( \ AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \
BOOST_PP_SUB_D(1,BOOST_MPL_UNROLLING_LIMIT,i) \ BOOST_PP_SUB_D(1,BOOST_MPL_UNROLLING_LIMIT,i) \
) \ ) \
@@ -170,7 +170,7 @@ struct iter_fold_if_impl
{ {
private: private:
typedef iter_fold_if_null_step<Iterator,State> forward_step0; typedef iter_fold_if_null_step<Iterator,State> forward_step0;
BOOST_PP_REPEAT_1ST( BOOST_PP_REPEAT_1(
BOOST_MPL_UNROLLING_LIMIT BOOST_MPL_UNROLLING_LIMIT
, AUX_ITER_FOLD_FORWARD_STEP , AUX_ITER_FOLD_FORWARD_STEP
, unused , unused
@@ -192,7 +192,7 @@ struct iter_fold_if_impl
> >
>::type AUX_LAST_BACKWARD_STEP; >::type AUX_LAST_BACKWARD_STEP;
BOOST_PP_REPEAT_1ST( BOOST_PP_REPEAT_1(
BOOST_MPL_UNROLLING_LIMIT BOOST_MPL_UNROLLING_LIMIT
, AUX_ITER_FOLD_BACKWARD_STEP , AUX_ITER_FOLD_BACKWARD_STEP
, unused , unused

View File

@@ -17,7 +17,7 @@
#ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED #ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED
#define 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) #if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) # define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param)

View File

@@ -17,7 +17,7 @@
#ifndef BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED #ifndef BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED
#define 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) #if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
# define BOOST_MPL_AUX_IS_LAMBDA_EXPR(value) /**/ # define BOOST_MPL_AUX_IS_LAMBDA_EXPR(value) /**/

View File

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

View File

@@ -20,7 +20,7 @@
#include "boost/mpl/lambda_fwd.hpp" #include "boost/mpl/lambda_fwd.hpp"
#include "boost/mpl/aux_/preprocessor/params.hpp" #include "boost/mpl/aux_/preprocessor/params.hpp"
#include "boost/mpl/aux_/lambda_arity_param.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) #if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)

View File

@@ -17,7 +17,7 @@
#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED #ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
#define 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) #if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)

View File

@@ -17,7 +17,11 @@
#ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED #ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED
#define 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 { namespace boost { namespace mpl { namespace aux {

View File

@@ -17,6 +17,7 @@
#ifndef BOOST_MPL_AUX_SEQUENCE_TAG_HPP_INCLUDED #ifndef BOOST_MPL_AUX_SEQUENCE_TAG_HPP_INCLUDED
#define 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" #include "boost/config.hpp"
#if defined(BOOST_MPL_INTERNAL_USE_SEQUENCE_TAG) || \ #if defined(BOOST_MPL_INTERNAL_USE_SEQUENCE_TAG) || \

View File

@@ -19,7 +19,7 @@
#include "boost/mpl/void.hpp" #include "boost/mpl/void.hpp"
#include "boost/mpl/aux_/preprocessor/params.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) #if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)

View File

@@ -17,7 +17,9 @@
#ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED #ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
#define 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 { namespace boost { namespace mpl { namespace aux {
@@ -29,7 +31,7 @@ struct value_wknd
}}} // namespace boost::mpl::aux }}} // 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 #else

View File

@@ -20,13 +20,13 @@
#include "boost/mpl/void.hpp" #include "boost/mpl/void.hpp"
#include "boost/mpl/aux_/arity.hpp" #include "boost/mpl/aux_/arity.hpp"
#include "boost/mpl/aux_/template_arity_fwd.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/params.hpp"
#include "boost/mpl/aux_/preprocessor/enum.hpp" #include "boost/mpl/aux_/preprocessor/enum.hpp"
#include "boost/mpl/aux_/preprocessor/def_params_tail.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" #include "boost/config.hpp"
@@ -34,7 +34,7 @@
BOOST_MPL_PP_ENUM(i, void_) \ 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) \ # define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \
namespace aux { \ namespace aux { \
template< int N > \ 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 #else
# define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) /**/ # 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<> \ template<> \
struct name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ struct name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \
{ \ { \
template< \ template< \
BOOST_MPL_PP_PARAMS(i, typename T) \ 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 \ struct apply \
: name< BOOST_MPL_PP_PARAMS(i, T) > \ : 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) || \ #if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) || \
defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) && \ defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) && \
@@ -90,7 +78,7 @@ struct template_arity< \
name< BOOST_MPL_PP_PARAMS(j, T) > \ name< BOOST_MPL_PP_PARAMS(j, T) > \
> \ > \
{ \ { \
BOOST_STATIC_CONSTANT(int, value = j ); \ BOOST_STATIC_CONSTANT(int, value = j); \
}; \ }; \
\ \
template<> \ template<> \
@@ -98,7 +86,7 @@ struct template_arity< \
name< BOOST_MPL_PP_ENUM(i, void_) > \ 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_ #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) \ #define BOOST_MPL_AUX_VOID_SPEC(i, name) \
BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \ BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
BOOST_MPL_AUX_VOID_SPEC_ARITY(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_ARITY(i, name) \
BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \ BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \
/**/ /**/
#endif
#endif // BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED #endif // BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED

View File

@@ -23,14 +23,14 @@
#include "boost/mpl/aux_/apply.hpp" #include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/config/bind.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) #if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/placeholder.hpp" # include "boost/mpl/placeholder.hpp"
# include "boost/mpl/void.hpp" # include "boost/mpl/void.hpp"
# include "boost/mpl/protect.hpp" # include "boost/mpl/protect.hpp"
# include "boost/mpl/limits/arity.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_/type_wrapper.hpp"
# include "boost/mpl/aux_/yes_no.hpp" # include "boost/mpl/aux_/yes_no.hpp"
# include "boost/type_traits/same_traits.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 { namespace aux {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
@@ -208,11 +218,13 @@ struct replace_unnamed_arg
} // namespace aux } // namespace aux
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
// forward declaration // forward declaration
template< template<
typename F, AUX_BIND_DEFAULT_PARAMS(typename T, void_) typename F, AUX_BIND_DEFAULT_PARAMS(typename T, void_)
> >
struct bind; struct bind;
#endif
// fwd, for 'resolve_bind_arg'/'is_bind_template' specializations // fwd, for 'resolve_bind_arg'/'is_bind_template' specializations
template< typename F, typename T > struct bind1st; 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; typedef typename AUX_APPLY((arg<N>, AUX_BIND_PARAMS(U)))::type type;
}; };
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
template< template<
typename F, AUX_BIND_PARAMS(typename T), AUX_BIND_PARAMS(typename U) 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 bind<F,AUX_BIND_PARAMS(T)> f_;
typedef typename AUX_APPLY((f_, AUX_BIND_PARAMS(U)))::type type; typedef typename AUX_APPLY((f_, AUX_BIND_PARAMS(U)))::type type;
}; };
#endif
template< template<
typename F, typename T, AUX_BIND_PARAMS(typename U) 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 // 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 // in case if we use 'aux::type_wrapper< bind<...> >' here, and all
// 'bind' instantiations form a complete type anyway // 'bind' instantiations form a complete type anyway
#if !defined(BOOST_MPL_NO_BIND_TEMPLATE)
template< template<
typename F, AUX_BIND_PARAMS(typename T) typename F, AUX_BIND_PARAMS(typename T)
> >
aux::yes_tag is_bind_helper(bind<F,AUX_BIND_PARAMS(T)>*); aux::yes_tag is_bind_helper(bind<F,AUX_BIND_PARAMS(T)>*);
#endif
template< int N > template< int N >
aux::yes_tag is_bind_helper(arg<N>*); aux::yes_tag is_bind_helper(arg<N>*);
@@ -289,39 +305,18 @@ template< typename T > struct is_bind_template
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #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 } // 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 \ #define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/bind.hpp")) (3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/bind.hpp"))
#include BOOST_PP_ITERATE() #include BOOST_PP_ITERATE()
@@ -350,14 +345,14 @@ struct bind
}; };
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// && !defined(BOOST_MPL_NO_BIND_TEMPLATE)
// bind1st/bind2nd, lightweight, for simple cases/backward compatibility // bind1st/bind2nd, lightweight, for simple cases/backward compatibility
template< typename F, typename T > template< typename F, typename T >
struct bind1st struct bind1st
{ {
template< 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 struct apply
: BOOST_MPL_AUX_APPLY2(F,T,U) : BOOST_MPL_AUX_APPLY2(F,T,U)
@@ -369,7 +364,8 @@ template< typename F, typename T >
struct bind2nd struct bind2nd
{ {
template< 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 struct apply
: BOOST_MPL_AUX_APPLY2(F,U,T) : 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_SPEC_PARAMS
# undef AUX_BIND_N_PARAMS # undef AUX_BIND_N_PARAMS
# undef AUX_BIND_DEFAULT_PARAMS # undef AUX_BIND_DEFAULT_PARAMS
@@ -401,7 +398,7 @@ template<
struct BOOST_PP_CAT(bind,i) struct BOOST_PP_CAT(bind,i)
{ {
template< template<
AUX_BIND_DEFAULT_PARAMS(typename U, void_) AUX_BIND_NESTED_DEFAULT_PARAMS(typename U, void_)
> >
struct apply struct apply
{ {
@@ -418,8 +415,10 @@ struct BOOST_PP_CAT(bind,i)
# endif // BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT # endif // BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT
# if i > 0
# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i, "boost/mpl/bind.hpp")) # define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i, "boost/mpl/bind.hpp"))
# include BOOST_PP_ITERATE() # include BOOST_PP_ITERATE()
# endif
public: public:
typedef typename BOOST_MPL_AUX_APPLY( typedef typename BOOST_MPL_AUX_APPLY(
@@ -455,25 +454,12 @@ is_bind_helper(BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T)>*);
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #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 } // 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 !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if i == BOOST_MPL_METAFUNCTION_MAX_ARITY #if i == BOOST_MPL_METAFUNCTION_MAX_ARITY
@@ -518,6 +504,7 @@ struct bind_impl_chooser<i>
} // namespace aux } // namespace aux
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif // BOOST_MPL_NO_BIND_TEMPLATE
# undef i # undef i

View File

@@ -58,12 +58,13 @@ template<
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last)
> >
struct distance 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) typename BOOST_MPL_AUX_ITERATOR_CATEGORY(First)
, First , First
, Last , Last
> >::type type;
{
}; };
#else #else

View File

@@ -30,13 +30,22 @@ struct int_c
typedef int value_type; typedef int value_type;
// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), // 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
#if !defined(__BORLANDC__) // either
typedef int_c<value + 1> next; #if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243
typedef int_c<value - 1> prior; 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 #else
typedef int_c<N + 1> next; typedef int_c<(value + 1)> next;
typedef int_c<N - 1> prior; typedef int_c<(value - 1)> prior;
#endif #endif
operator int() const { return this->value; } operator int() const { return this->value; }

View File

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

View File

@@ -17,7 +17,7 @@
#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED #ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED
#define 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) #if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
# include "boost/mpl/aux_/full_lambda.hpp" # include "boost/mpl/aux_/full_lambda.hpp"

View File

@@ -58,7 +58,7 @@ namespace mpl {
#else #else
#define i BOOST_PP_FRAME_ITERATION(1) #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)) \ typedef BOOST_PP_CAT(T, BOOST_PP_INC(i)) \
BOOST_PP_CAT(arg, 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/apply_if.hpp"
#include "boost/mpl/aux_/apply.hpp" #include "boost/mpl/aux_/apply.hpp"
#include "boost/mpl/aux_/deref_wknd.hpp" #include "boost/mpl/aux_/deref_wknd.hpp"
#include "boost/mpl/aux_/value_wknd.hpp"
#include "boost/mpl/aux_/void_spec.hpp" #include "boost/mpl/aux_/void_spec.hpp"
namespace boost { namespace boost {
@@ -69,9 +70,9 @@ struct lower_bound_step
, typename BOOST_MPL_AUX_DEREF_WNKD(middle_) , typename BOOST_MPL_AUX_DEREF_WNKD(middle_)
, T , T
)::type )::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_> > ::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 > ::template result_< Predicate,T,DeferredIterator >
>::type type; >::type type;
}; };
@@ -90,7 +91,7 @@ struct lower_bound
typedef typename lambda<Predicate>::type pred_; typedef typename lambda<Predicate>::type pred_;
public: 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; ::template result_< pred_,T,begin<Sequence> >::type type;
}; };

View File

@@ -60,11 +60,6 @@ using boost::mpl::_;
} // namespace mpl } // namespace mpl
} // namespace boost } // 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_USE_PREPROCESSED_HEADERS
#endif // BOOST_MPL_PLACEHOLDER_HPP_INCLUDED #endif // BOOST_MPL_PLACEHOLDER_HPP_INCLUDED

View File

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

View File

@@ -28,7 +28,7 @@ template< typename T1 >
struct same_as struct same_as
{ {
template< typename T2 > struct apply template< typename T2 > struct apply
#if !defined(__BORLANDC__) #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551 && defined(BOOST_STRICT_CONFIG))
: is_same<T1,T2> : is_same<T1,T2>
{ {
#else #else
@@ -42,7 +42,7 @@ template< typename T1 >
struct not_same_as struct not_same_as
{ {
template< typename T2 > struct apply template< typename T2 > struct apply
#if !defined(__BORLANDC__) #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x51 && defined(BOOST_STRICT_CONFIG))
: logical_not< is_same<T1,T2> > : logical_not< is_same<T1,T2> >
{ {
#else #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/void.hpp"
#include "boost/mpl/aux_/void_spec.hpp" #include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_spec.hpp" #include "boost/mpl/aux_/lambda_spec.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#include "boost/type_traits/is_same.hpp" #include "boost/type_traits/is_same.hpp"
namespace boost { namespace boost {
@@ -75,9 +76,13 @@ struct unique
>::type fold_result_; >::type fold_result_;
public: public:
#if defined(BOOST_MPL_MSVC_ETI_BUG)
// MSVC6.5 forces us to use 'select1st<fold_result_>::type' instead of // MSVC6.5 forces us to use 'select1st<fold_result_>::type' instead of
// simple 'fold_result_::first' here // simple 'fold_result_::first' here
typedef typename select1st<fold_result_>::type type; typedef typename select1st<fold_result_>::type type;
#else
typedef typename fold_result_::first type;
#endif
}; };
BOOST_MPL_AUX_VOID_SPEC(1, unique) BOOST_MPL_AUX_VOID_SPEC(1, unique)

View File

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

View File

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