Commit f3b95df7 authored by Mark Olesen's avatar Mark Olesen
Browse files

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

- real bug or compiler bug?
parent 654db94d
...@@ -40,14 +40,6 @@ Description ...@@ -40,14 +40,6 @@ Description
namespace Foam 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 Class objectHit Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
...@@ -106,22 +98,22 @@ public: ...@@ -106,22 +98,22 @@ public:
// Friend Operators // 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 // 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();
} }
}; };
......
...@@ -118,24 +118,24 @@ public: ...@@ -118,24 +118,24 @@ public:
// Member Operators // 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_; 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); return !(a == b);
} }
// IOstream Operators // IOstream Operators
friend inline Istream& operator>>(Istream& is, labelBits& lb) inline friend Istream& operator>>(Istream& is, labelBits& lb)
{ {
return is >> lb.data_; 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_; return os << lb.data_;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment