Sun patch

[SVN r16131]
This commit is contained in:
Aleksey Gurtovoy
2002-11-06 11:53:07 +00:00
parent bd7e6c0c18
commit e0a3d316cc
2 changed files with 27 additions and 11 deletions

View File

@ -21,18 +21,32 @@
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/
#else
#if defined(__SUNPRO_CC)
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
typedef mpl::bool_c< C > type; \
enum { value = type::value }; \
/**/
# define BOOST_TT_AUX_BOOL_C_BASE(C)
# endif
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1200
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
typedef mpl::bool_c< C > base_; \
using base_::value; \
/**/
#endif
#ifndef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/
#endif
#ifndef BOOST_TT_AUX_BOOL_C_BASE
# define BOOST_TT_AUX_BOOL_C_BASE(C) : mpl::bool_c< C >
#endif
#define BOOST_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \
template< typename T > struct trait \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
@ -43,7 +57,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
#define BOOST_TT_AUX_BOOL_TRAIT_DEF2(trait,T1,T2,C) \
template< typename T1, typename T2 > struct trait \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \
@ -54,7 +68,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \
template<> struct trait< sp > \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(sp)) \
@ -63,7 +77,7 @@ template<> struct trait< sp > \
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,sp1,sp2,C) \
template<> struct trait< sp1,sp2 > \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(sp1,sp2)) \
@ -72,7 +86,7 @@ template<> struct trait< sp1,sp2 > \
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(param,trait,sp,C) \
template< param > struct trait< sp > \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
@ -80,7 +94,7 @@ template< param > struct trait< sp > \
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,sp,C) \
template< param1, param2 > struct trait< sp > \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
@ -88,7 +102,7 @@ template< param1, param2 > struct trait< sp > \
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \
template< param > struct trait< sp1,sp2 > \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(sp1,sp2)) \
@ -97,7 +111,7 @@ template< param > struct trait< sp1,sp2 > \
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(param1,param2,trait,sp1,sp2,C) \
template< param1, param2 > struct trait< sp1,sp2 > \
: mpl::bool_c< C > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \

View File

@ -16,6 +16,8 @@
// no include guards, the header is intended for multiple inclusion!
#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
#undef BOOST_TT_AUX_BOOL_C_BASE
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1