COMP: undefined operator==(const objectHit&, const objectHit&) with clang

- real bug or compiler bug?
This commit is contained in:
Mark Olesen
2010-12-21 15:43:07 +01:00
parent 654db94d7a
commit f3b95df7b9
2 changed files with 10 additions and 18 deletions

View File

@ -40,14 +40,6 @@ Description
namespace Foam
{
// Forward declaration of friend functions and operators
class objectHit;
inline bool operator==(const objectHit&, const objectHit&);
inline bool operator!=(const objectHit&, const objectHit&);
inline Ostream& operator<<(Ostream&, const objectHit&);
/*---------------------------------------------------------------------------*\
Class objectHit Declaration
\*---------------------------------------------------------------------------*/
@ -106,22 +98,22 @@ public:
// Friend Operators
friend bool operator==(const objectHit& a, const objectHit& b)
inline friend bool operator==(const objectHit& a, const objectHit& b)
{
return ((a.hit_ == b.hit_) && (a.hitObject_ == b.hitObject_));
return (a.hit_ == b.hit_) && (a.hitObject_ == b.hitObject_);
}
friend bool operator!=(const objectHit& a, const objectHit& b)
inline friend bool operator!=(const objectHit& a, const objectHit& b)
{
return (!(a == b));
return !(a == b);
}
// Ostream operator
friend Ostream& operator<<(Ostream& os, const objectHit& b)
inline friend Ostream& operator<<(Ostream& os, const objectHit& obj)
{
return os << b.hit() << token::SPACE << b.hitObject();
return os << obj.hit() << token::SPACE << obj.hitObject();
}
};

View File

@ -118,24 +118,24 @@ public:
// Member Operators
friend inline bool operator==(const labelBits& a, const labelBits& b)
inline friend bool operator==(const labelBits& a, const labelBits& b)
{
return a.data_ == b.data_;
}
friend inline bool operator!=(const labelBits& a, const labelBits& b)
inline friend bool operator!=(const labelBits& a, const labelBits& b)
{
return !(a == b);
}
// IOstream Operators
friend inline Istream& operator>>(Istream& is, labelBits& lb)
inline friend Istream& operator>>(Istream& is, labelBits& lb)
{
return is >> lb.data_;
}
friend inline Ostream& operator<<(Ostream& os, const labelBits& lb)
inline friend Ostream& operator<<(Ostream& os, const labelBits& lb)
{
return os << lb.data_;
}