mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: undefined operator==(const objectHit&, const objectHit&) with clang
- real bug or compiler bug?
This commit is contained in:
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user