Boost logo

Boost :

From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2006-05-26 19:00:49

The new integral_promotion.hpp doesn't compile with the old EDG238-based
MIPSpro 7.3.1 compiler (SGI, IRIX). This breaks our Boost.Python build.
However, with the simple patch below the build is OK again. I'd love to
maintain the MIPSpro Boost.Python build, but it is not worth serious work.
Therefore the patch is simply #ifdef'ing out the two promotion header files for
this specific platform. Are there any objections against this approach?



Index: type_traits.hpp
RCS file: /cvsroot/boost/boost/boost/type_traits.hpp,v
retrieving revision 1.16
diff -u -r1.16 type_traits.hpp
--- type_traits.hpp 22 May 2006 21:02:59 -0000 1.16
+++ type_traits.hpp 26 May 2006 22:45:51 -0000
@@ -71,8 +71,10 @@
 #include "boost/type_traits/function_traits.hpp"
 #include "boost/type_traits/aligned_storage.hpp"
 #include "boost/type_traits/floating_point_promotion.hpp"
+#if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238))
 #include "boost/type_traits/integral_promotion.hpp"
 #include "boost/type_traits/promote.hpp"
 #include "boost/type_traits/ice.hpp"

For the records, this is the error:

cc-3313 CC: ERROR File = boost/boost/type_traits/integral_promotion.hpp, Line =
  The expression must have arithmetic or enum type.

      BOOST_STATIC_CONSTANT(int, value = sizeof(promoted_index_tester(+testee))

I've reduced it to:

template<int N>
struct sized_type_for_promotion
    typedef char (&type)[N];

sized_type_for_promotion<1> ::type promoted_index_tester(int);
sized_type_for_promotion<2> ::type promoted_index_tester(unsigned int);
sized_type_for_promotion<3> ::type promoted_index_tester(long);
sized_type_for_promotion<4> ::type promoted_index_tester(unsigned long);

template<class T>
struct promoted_index
    static T testee;
    static const int value = sizeof(promoted_index_tester(+testee));

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Boost list run by bdawes at, gregod at, cpdaniel at, john at