Fixed C++ Builder 6 compile errors

[SVN r15404]
This commit is contained in:
John Maddock
2002-09-17 11:11:20 +00:00
parent c5e909e6e1
commit 0bbd93e7a0
2 changed files with 18 additions and 1 deletions

View File

@@ -157,6 +157,18 @@ struct if_
BOOST_MPL_AUX_VOID_SPEC(3, if_)
/*
template<>
struct if_< void_,void_,void_ >
{
template< typename T1,typename T2,typename T3 , typename T4=void_, typename T5=void_ >
struct apply : if_< T1,T2,T3 > { };
};
namespace aux { template< typename T1,typename T2,typename T3 > struct template_arity< if_< T1,T2,T3 > > { static const int value = 3; };
template<> struct template_arity< if_< void_,void_,void_ > > { static const int value = 3; }; }
*/
} // namespace mpl
} // namespace boost

View File

@@ -31,7 +31,12 @@ struct integral_c
// 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__) || defined(__IBMCPP__) || defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241
#if defined(__BORLANDC__)
BOOST_STATIC_CONSTANT(T, next_value = (value + 1));
BOOST_STATIC_CONSTANT(T, prior_value = (value - 1));
typedef integral_c<T, (N+1)> next;
typedef integral_c<T, (N-1)> prior;
#elif defined(__IBMCPP__) || defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241
BOOST_STATIC_CONSTANT(T, next_value = (N + 1));
BOOST_STATIC_CONSTANT(T, prior_value = (N - 1));
typedef integral_c<T, next_value> next;