Boost logo

Boost :

From: Boris Gubenko (Boris.Gubenko_at_[hidden])
Date: 2006-10-21 12:36:30


  Three mpl headers -- integral_c.hpp, integral_c_fwd.hpp and
  integral_wrapper.hpp -- contain outdated workarounds for HP-UX
  aCC. When compiled with aCC6, these workarounds are causing
  compilation errors because the resulting code looks like the
  following:

template< typename T, long N >
struct integral_c
{
//#if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
    static const T value = N;
//#else
// the correct code
// static const T value = (T) N;
//#endif
};
enum udt_builtin_mixture_enum {};
integral_c<udt_builtin_mixture_enum, 0> x;

  A typical compilation error is:

"../../../boost/mpl/aux_/integral_wrapper.hpp", line 45: error #2144: a
value
          of type "long" cannot be used to initialize an entity of type
          "const boost::numeric::sign_mixture_enum"
      BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N);

  Attached patches change invocation of BOOST_WORKAROUND macro in
  the aforementioned mpl headers from:

#if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))

  to:

#if BOOST_WORKAROUND(__HP_aCC, <= 53800)

  With patches below, the following tests that previously failed
  to compile with "error #2144", compile and pass:

        Library Test
        ------------------ ---------------------
        conversion numeric_cast_test
        numeric/conversion traits_test
        numeric/conversion converter_test
        numeric/conversion udt_support_test
        numeric/conversion numeric_cast_test
        numeric/conversion udt_example_0
        python builtin_converters
        python vector_indexing_suite
        python pointer_vector
        xpressive regress
        xpressive c_traits
        xpressive misc1
        xpressive test_dynamic
        xpressive multiple_defs

  Can the three patches below be applied to both the HEAD and the
  RC branch?

  Thanks,
    Boris

Index: integral_c.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpl/integral_c.hpp,v
retrieving revision 1.22
diff -r1.22 integral_c.hpp
22c22
< #if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))

---
> #if BOOST_WORKAROUND(__HP_aCC, <= 53800)
Index: integral_c_fwd.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpl/integral_c_fwd.hpp,v
retrieving revision 1.4
diff -r1.4 integral_c_fwd.hpp
22c22
< #if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
---
> #if BOOST_WORKAROUND(__HP_aCC, <= 53800)
Index: integral_wrapper.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpl/aux_/integral_wrapper.hpp,v
retrieving revision 1.10
diff -r1.10 integral_wrapper.hpp
68c68
<     || BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
---
>     || BOOST_WORKAROUND(__HP_aCC, <= 53800)

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk