diff --git a/src/OpenFOAM/db/IOstreams/token/token.H b/src/OpenFOAM/db/IOstreams/token/token.H index 7110d918b2552ba3635c1a81957f64829af548aa..1cf8143719f5e435575aa34531ebbdda10c8d676 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.H +++ b/src/OpenFOAM/db/IOstreams/token/token.H @@ -55,7 +55,7 @@ SourceFiles namespace Foam { -// Forward declaration of friend functions and operators +// Forward declarations class token; @@ -76,7 +76,7 @@ public: // the maximum number of types is limited to 30. enum tokenType { - UNDEFINED, //!< An undefined token-type + UNDEFINED = 0, //!< An undefined token-type // Fundamental types FLAG, //!< stream flag (1-byte bitmask) @@ -303,7 +303,7 @@ public: // Constructors //- Construct null - inline token(); + inline constexpr token() noexcept; //- Copy construct inline token(const token& t); diff --git a/src/OpenFOAM/db/IOstreams/token/tokenI.H b/src/OpenFOAM/db/IOstreams/token/tokenI.H index f6868ec15239a01f9fb25e1d7bbc8cf98ec368b5..da3f0abcdf7d85eaf7efa6df013b631e56bc392c 100644 --- a/src/OpenFOAM/db/IOstreams/token/tokenI.H +++ b/src/OpenFOAM/db/IOstreams/token/tokenI.H @@ -118,7 +118,7 @@ inline void Foam::token::clear() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::token::token() +inline constexpr Foam::token::token() noexcept : data_(), // bit-wise zero for union content type_(tokenType::UNDEFINED),