Proper fixes for Borland, IBM, and EDG (we hope)

[SVN r15405]
This commit is contained in:
Dave Abrahams
2002-09-17 12:12:24 +00:00
parent 0bbd93e7a0
commit 18a66d5e2e

View File

@@ -31,21 +31,19 @@ struct integral_c
// 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)
#if defined(__BORLANDC__) #if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241
BOOST_STATIC_CONSTANT(T, next_value = (value + 1)); private:
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, next_value = (N + 1));
BOOST_STATIC_CONSTANT(T, prior_value = (N - 1)); BOOST_STATIC_CONSTANT(T, prior_value = (N - 1));
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__)
typedef integral_c<T, (N + 1)> next;
typedef integral_c<T, (N - 1)> prior;
#else #else
BOOST_STATIC_CONSTANT(T, next_value = (value + 1)); typedef integral_c<T, (value + 1)> next;
BOOST_STATIC_CONSTANT(T, prior_value = (value - 1)); typedef integral_c<T, (value - 1)> prior;
typedef integral_c<T, next_value> next;
typedef integral_c<T, prior_value> prior;
#endif #endif
// enables uniform function call syntax for families of overloaded // enables uniform function call syntax for families of overloaded