pTraits::read: Moved the read<Type>(Istream&) from read.H to pTraits.H

so that primitives can be read from Istream without the need to include
IStringStream.H
This commit is contained in:
Henry Weller
2023-06-21 12:44:55 +01:00
parent 3ef7a23b32
commit 9de6683244
2 changed files with 9 additions and 7 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -71,6 +71,13 @@ public:
};
template<typename Type>
inline Type read(Istream& is)
{
return pTraits<Type>(is);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -32,6 +32,7 @@ Description
#ifndef read_H
#define read_H
#include "pTraits.H"
#include "IStringStream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -41,12 +42,6 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<typename Type>
inline Type read(Istream& is)
{
return pTraits<Type>(is);
}
template<typename Type>
inline Type read(const string& str)
{