COMP: fix inline friend declarations (gcc-4.8.5)

This commit is contained in:
Mark Olesen 2021-01-27 09:41:49 +01:00
parent 8bda4fadbe
commit aa1e1eb15d
12 changed files with 29 additions and 47 deletions

View File

@ -44,11 +44,7 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
class Istream;
class Ostream;
// Forward declaration of friend functions and operators
// Forward Declarations
class magnet;
Istream& operator>>(Istream&, magnet&);
Ostream& operator<<(Ostream&, const magnet&);

View File

@ -337,14 +337,14 @@ public:
// IOstream Operators
//- Read from Istream, discarding existing contents
inline friend Istream& operator>> <T, SizeMin>
friend Istream& operator>> <T, SizeMin>
(
Istream& is,
DynamicList<T, SizeMin>& rhs
);
//- Write to Ostream
inline friend Ostream& operator<< <T, SizeMin>
friend Ostream& operator<< <T, SizeMin>
(
Ostream& os,
const DynamicList<T, SizeMin>& rhs

View File

@ -54,8 +54,8 @@ template<class Container, class Delimiters> class OutputAdaptor;
template<class Container, class Delimiters>
inline Ostream& operator<<
(
Ostream&,
const FlatOutput::OutputAdaptor<Container, Delimiters>&
Ostream& os,
const FlatOutput::OutputAdaptor<Container, Delimiters>& adaptor
);
@ -187,8 +187,7 @@ public:
// Operators
//- Ostream Operator
inline friend Ostream&
operator<<
friend Ostream& operator<<
(
Ostream& os,
const OutputAdaptor<Container, Delimiters>& adaptor

View File

@ -271,14 +271,14 @@ public:
// IOstream Operators
//- Read from Istream, discarding existing contents
inline friend Istream& operator>> <T, SizeMin>
friend Istream& operator>> <T, SizeMin>
(
Istream& is,
DynamicField<T, SizeMin>& rhs
);
//- Write to Ostream
inline friend Ostream& operator<< <T, SizeMin>
friend Ostream& operator<< <T, SizeMin>
(
Ostream& os,
const DynamicField<T, SizeMin>& rhs

View File

@ -48,8 +48,8 @@ namespace Foam
// Forward Declarations
class labelledTri;
Istream& operator>>(Istream&, labelledTri&);
Ostream& operator<<(Ostream&, const labelledTri&);
inline Istream& operator>>(Istream&, labelledTri&);
inline Ostream& operator<<(Ostream&, const labelledTri&);
/*---------------------------------------------------------------------------*\
Class labelledTri Declaration
@ -119,8 +119,8 @@ public:
// IOstream Operators
inline friend Istream& operator>>(Istream&, labelledTri&);
inline friend Ostream& operator<<(Ostream&, const labelledTri&);
friend Istream& operator>>(Istream&, labelledTri&);
friend Ostream& operator<<(Ostream&, const labelledTri&);
};

View File

@ -45,7 +45,7 @@ SourceFiles
namespace Foam
{
// Forward declarations
// Forward Declarations
class objectMap;
inline bool operator==(const objectMap& a, const objectMap& b);

View File

@ -49,13 +49,7 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
class Istream;
class Ostream;
// Forward declaration of friend functions and operators
// Forward Declarations
template<class Point, class PointRef> class line;

View File

@ -280,13 +280,13 @@ public:
{
if (is.format() == IOstream::ASCII)
{
return is >> pHit.hit_ >> pHit.point_ >> pHit.index_;
is >> pHit.hit_ >> pHit.point_ >> pHit.index_;
}
else
{
// TODO (2019-08-06):
// cannot properly handle mixed-precision reading
// owning to bool and Point type.
// owing to bool and Point type.
is.read
(

View File

@ -57,11 +57,9 @@ SourceFiles
namespace Foam
{
// Forward declarations
class Istream;
class Ostream;
class tetPoints;
// Forward Declarations
class plane;
class tetPoints;
template<class Point, class PointRef> class tetrahedron;
@ -310,7 +308,7 @@ public:
boundBox bounds() const;
// IOstream operators
// IOstream Operators
friend Istream& operator>> <Point, PointRef>
(

View File

@ -54,8 +54,6 @@ namespace Foam
{
// Forward Declarations
class Istream;
class Ostream;
class plane;
class triPoints;
@ -355,7 +353,7 @@ public:
) const;
// IOstream operators
// IOstream Operators
friend Istream& operator>> <Point, PointRef>
(

View File

@ -52,13 +52,11 @@ SourceFiles
namespace Foam
{
// Forward declarations
// Forward Declarations
class triad;
class quaternion;
class Istream;
class Ostream;
Istream& operator>>(Istream&, triad&);
Ostream& operator<<(Ostream&, const triad&);
inline Istream& operator>>(Istream&, triad&);
inline Ostream& operator<<(Ostream&, const triad&);
/*---------------------------------------------------------------------------*\
Class triad Declaration
@ -68,7 +66,6 @@ class triad
:
public Vector<vector>
{
public:
// Constructors
@ -160,8 +157,8 @@ public:
// IOstream Operators
inline friend Istream& operator>>(Istream&, triad&);
inline friend Ostream& operator<<(Ostream&, const triad&);
friend Istream& operator>>(Istream&, triad&);
friend Ostream& operator<<(Ostream&, const triad&);
};

View File

@ -47,9 +47,9 @@ SourceFiles
namespace Foam
{
// Forward declaration of friend functions and operators
// Forward Declarations
class STLtriangle;
Ostream& operator<<(Ostream& os, const STLtriangle& tri);
inline Ostream& operator<<(Ostream& os, const STLtriangle& tri);
/*---------------------------------------------------------------------------*\
Class STLtriangle Declaration
@ -141,10 +141,10 @@ public:
);
// Ostream operator
// Ostream Operator
//- Print triangle contents
inline friend Ostream& operator<<(Ostream& os, const STLtriangle& tri);
friend Ostream& operator<<(Ostream& os, const STLtriangle& tri);
};