Boost logo

Boost :

From: Pascal Bleser (pascal.bleser_at_[hidden])
Date: 2003-08-04 08:03:05


Sorry if this is a recurrent question...

Has anybody been able to compile BOOST (date_time and test) with aCC (HP ANSI C++ B3910B A.03.35) on
HP-UX ?

I tried using configure and with the new STL shipped with the compiler (-AA flag): the configure
seems pretty good (no "Failed"), but the compilation of date_time fails:

Error 174: "/sw/local/pab/boost_1_30_0/boost/operators.hpp", line 368 # Function redefinition;
previously defined as "bool boost::operator
     <=(const #1 &,const #2 &)" at ["/sw/local/pab/boost_1_30_0/boost/operators.hpp", line 125].
       friend bool operator<=(const T& x, const U& y)
                           ^^
Error 445: "/sw/local/pab/boost_1_30_0/boost/operators.hpp", line 368 # Cannot recover from earlier
errors.
       friend bool operator<=(const T& x, const U& y)
       ^^^^^^^^^^^^^^^^^^^^^^

The offending code snippets are the following (in boost/operators.hpp):

template <class T, class U, class B = ::boost::detail::empty_base>
struct less_than_comparable2 : B
{
      friend bool operator<=(const T& x, const U& y) { return !(x > y); }
      friend bool operator>=(const T& x, const U& y) { return !(x < y); }
      friend bool operator>(const U& x, const T& y) { return y < x; }
      friend bool operator<(const U& x, const T& y) { return y > x; }
      friend bool operator<=(const U& x, const T& y) { return !(y < x); }
      friend bool operator>=(const U& x, const T& y) { return !(y > x); }
};
[...]
template <class T, class U, class B = ::boost::detail::empty_base>
struct partially_ordered2 : B
{
   friend bool operator<=(const T& x, const U& y)
     { return (x < y) || (x == y); }
   friend bool operator>=(const T& x, const U& y)
     { return (x > y) || (x == y); }
   friend bool operator>(const U& x, const T& y)
     { return y < x; }
   friend bool operator<(const U& x, const T& y)
     { return y > x; }
   friend bool operator<=(const U& x, const T& y)
     { return (y > x) || (y == x); }
   friend bool operator>=(const U& x, const T& y)
     { return (y < x) || (y == x); }
};

aCC tells me that it's the same function... yuck...
Agreed, it's a sick compiler, but nevertheless...

I will try once more using STLport, but it's not about the STL IMHO.

Thanks for any help.

-- 
   -o) Pascal Bleser             ATOS Origin/Aachen(DE)
   /\\ System Architect  <pascal.bleser_at_[hidden]>
  _\_v Project Leader WLP Online Framework
   The more things change, the more they stay insane.

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