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  <[EMAIL PROTECTED]>
 _\_v Project Leader WLP Online Framework
  The more things change, the more they stay insane.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to