diff --git a/applications/test/List/Make/files b/applications/test/List/Make/files index 35935365d6..44da0672c1 100644 --- a/applications/test/List/Make/files +++ b/applications/test/List/Make/files @@ -1,3 +1,3 @@ -Test-List.C +Test-List.cxx EXE = $(FOAM_USER_APPBIN)/Test-List diff --git a/applications/test/List/Test-List.C b/applications/test/List/Test-List.cxx similarity index 99% rename from applications/test/List/Test-List.C rename to applications/test/List/Test-List.cxx index 74b3701e54..9b747a5395 100644 --- a/applications/test/List/Test-List.C +++ b/applications/test/List/Test-List.cxx @@ -75,8 +75,6 @@ public: -namespace Detail -{ namespace ListPolicy { @@ -84,7 +82,6 @@ namespace ListPolicy template<> struct short_length : std::integral_constant {}; } // End namespace ListPolicy -} // End namespace Detail } // End namespace Foam @@ -119,9 +116,9 @@ Ostream& printListOutputType(const char* what) Info<< what << " (contiguous=" << is_contiguous_v << " no_linebreak=" - << Detail::ListPolicy::no_linebreak::value + << ListPolicy::no_linebreak::value << " short_length=" - << Detail::ListPolicy::short_length::value << ')'; + << ListPolicy::short_length::value << ')'; return Info; } diff --git a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H index cc88ba4c38..b55c7313ca 100644 --- a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H +++ b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H @@ -610,11 +610,11 @@ struct Hash> : PackedList::hasher {}; // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // //- Write List to Ostream, as per UList::writeList() with default length. -// The default short-length is given by Detail::ListPolicy::short_length +// The default short-length is given by Foam::ListPolicy::short_length template Ostream& operator<<(Ostream& os, const PackedList& list) { - return list.writeList(os, Detail::ListPolicy::short_length::value); + return list.writeList(os, Foam::ListPolicy::short_length::value); } diff --git a/src/OpenFOAM/containers/Buffers/CircularBufferIO.C b/src/OpenFOAM/containers/Buffers/CircularBufferIO.C index 3bb903e415..18dbe29db5 100644 --- a/src/OpenFOAM/containers/Buffers/CircularBufferIO.C +++ b/src/OpenFOAM/containers/Buffers/CircularBufferIO.C @@ -136,7 +136,7 @@ Foam::Ostream& Foam::CircularBuffer::writeList || ( (len <= shortLen) - && (is_contiguous_v || Detail::ListPolicy::no_linebreak::value) + && (is_contiguous_v || Foam::ListPolicy::no_linebreak::value) ) ) { diff --git a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H index b270f20070..e0a1fb03de 100644 --- a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H +++ b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H @@ -542,7 +542,7 @@ Istream& operator>>(Istream& is, CompactListList& list) template Ostream& operator<<(Ostream& os, const CompactListList& list) { - return list.writeList(os, Detail::ListPolicy::short_length::value); + return list.writeList(os, Foam::ListPolicy::short_length::value); } diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C index ba4f9298b1..eda9072524 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C @@ -379,7 +379,7 @@ Foam::HashSet::operator-=(const HashSet& rhs) template Foam::Ostream& Foam::operator<<(Ostream& os, const HashSet& rhs) { - return rhs.writeKeys(os, Detail::ListPolicy::short_length::value); + return rhs.writeKeys(os, Foam::ListPolicy::short_length::value); } diff --git a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBase.H b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBase.H index 03ea65004c..e575982af9 100644 --- a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBase.H +++ b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBase.H @@ -397,11 +397,11 @@ public: // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // //- Write List to Ostream, as per UList::writeList() with default length. -// The default short-length is given by Detail::ListPolicy::short_length +// The default short-length is given by Foam::ListPolicy::short_length template Ostream& operator<<(Ostream& os, const IndirectListBase& list) { - return list.writeList(os, Detail::ListPolicy::short_length::value); + return list.writeList(os, Foam::ListPolicy::short_length::value); } diff --git a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C index 1978873331..620cd63ced 100644 --- a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C +++ b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C @@ -80,7 +80,7 @@ Foam::Ostream& Foam::IndirectListBase::writeList || ( (len <= shortLen) - && (is_contiguous_v || Detail::ListPolicy::no_linebreak::value) + && (is_contiguous_v || Foam::ListPolicy::no_linebreak::value) ) ) { diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H index e5db262820..8d8d818b95 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H @@ -594,11 +594,11 @@ Istream& operator>>(Istream& is, FixedList& list) //- Write List to Ostream, as per FixedList::writeList() with default length. -// The default short-length is given by Detail::ListPolicy::short_length +// The default short-length is given by Foam::ListPolicy::short_length template Ostream& operator<<(Ostream& os, const FixedList& list) { - return list.writeList(os, Detail::ListPolicy::short_length::value); + return list.writeList(os, Foam::ListPolicy::short_length::value); } diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C index 161498d9a9..7277a5d63f 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C @@ -106,7 +106,7 @@ Foam::Ostream& Foam::FixedList::writeList || ( (N <= unsigned(shortLen)) - && (is_contiguous_v || Detail::ListPolicy::no_linebreak::value) + && (is_contiguous_v || Foam::ListPolicy::no_linebreak::value) ) ) { diff --git a/src/OpenFOAM/containers/Lists/List/UList.H b/src/OpenFOAM/containers/Lists/List/UList.H index e027fb35fb..ede6083323 100644 --- a/src/OpenFOAM/containers/Lists/List/UList.H +++ b/src/OpenFOAM/containers/Lists/List/UList.H @@ -682,11 +682,11 @@ Istream& operator>>(Istream& is, UList& list) //- Write List to Ostream, as per UList::writeList() with default length. -// The default short-length is given by Detail::ListPolicy::short_length +// The default short-length is given by Foam::ListPolicy::short_length template Ostream& operator<<(Ostream& os, const UList& list) { - return list.writeList(os, Detail::ListPolicy::short_length::value); + return list.writeList(os, Foam::ListPolicy::short_length::value); } //- Write std::vector to Ostream. ASCII only, no line-breaks diff --git a/src/OpenFOAM/containers/Lists/List/UListIO.C b/src/OpenFOAM/containers/Lists/List/UListIO.C index 1a7ed4385d..bd85943a7f 100644 --- a/src/OpenFOAM/containers/Lists/List/UListIO.C +++ b/src/OpenFOAM/containers/Lists/List/UListIO.C @@ -127,7 +127,7 @@ Foam::Ostream& Foam::UList::writeList || ( (len <= shortLen) - && (is_contiguous_v || Detail::ListPolicy::no_linebreak::value) + && (is_contiguous_v || Foam::ListPolicy::no_linebreak::value) ) ) { diff --git a/src/OpenFOAM/containers/Lists/policy/ListPolicy.H b/src/OpenFOAM/containers/Lists/policy/ListPolicy.H index 81b3c106b2..1482c155f9 100644 --- a/src/OpenFOAM/containers/Lists/policy/ListPolicy.H +++ b/src/OpenFOAM/containers/Lists/policy/ListPolicy.H @@ -24,7 +24,7 @@ License along with OpenFOAM. If not, see . Namespace - Foam::Detail::ListPolicy + Foam::ListPolicy Description Additional compile-time controls of List behaviour @@ -46,8 +46,6 @@ class keyType; class word; class wordRe; -namespace Detail -{ namespace ListPolicy { @@ -126,7 +124,6 @@ enum uniformity check_uniformity(InputIt first, InputIt last) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace ListPolicy -} // End namespace Detail } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/expressions/value/exprValueFieldTag.C b/src/OpenFOAM/expressions/value/exprValueFieldTag.C index 0e739b8a86..04286b7126 100644 --- a/src/OpenFOAM/expressions/value/exprValueFieldTag.C +++ b/src/OpenFOAM/expressions/value/exprValueFieldTag.C @@ -34,7 +34,7 @@ bool Foam::expressions::exprValueFieldTag::empty() const noexcept { return ( - uniformity_ == Foam::Detail::ListPolicy::uniformity::EMPTY + uniformity_ == Foam::ListPolicy::uniformity::EMPTY ); } @@ -43,7 +43,7 @@ bool Foam::expressions::exprValueFieldTag::is_uniform() const noexcept { return ( - uniformity_ == Foam::Detail::ListPolicy::uniformity::UNIFORM + uniformity_ == Foam::ListPolicy::uniformity::UNIFORM ); } @@ -52,9 +52,9 @@ bool Foam::expressions::exprValueFieldTag::is_nonuniform() const noexcept { return ( - uniformity_ == Foam::Detail::ListPolicy::uniformity::NONUNIFORM + uniformity_ == Foam::ListPolicy::uniformity::NONUNIFORM // Extra safety for direct reductions? - // || uniformity_ == Foam::Detail::ListPolicy::uniformity::MIXED + // || uniformity_ == Foam::ListPolicy::uniformity::MIXED ); } @@ -68,14 +68,14 @@ Foam::expressions::exprValueFieldTag::value() const noexcept void Foam::expressions::exprValueFieldTag::set_empty() { - uniformity_ = Foam::Detail::ListPolicy::uniformity::EMPTY; + uniformity_ = Foam::ListPolicy::uniformity::EMPTY; value_ = Foam::zero{}; } void Foam::expressions::exprValueFieldTag::set_nouniform() { - uniformity_ = Foam::Detail::ListPolicy::uniformity::NONUNIFORM; + uniformity_ = Foam::ListPolicy::uniformity::NONUNIFORM; value_ = Foam::zero{}; } @@ -145,7 +145,7 @@ void Foam::expressions::exprValueFieldTag::reduce() ( shape == static_cast ( - Foam::Detail::ListPolicy::uniformity::EMPTY + Foam::ListPolicy::uniformity::EMPTY ) ) { @@ -156,7 +156,7 @@ void Foam::expressions::exprValueFieldTag::reduce() ( shape == static_cast ( - Foam::Detail::ListPolicy::uniformity::UNIFORM + Foam::ListPolicy::uniformity::UNIFORM ) ) { diff --git a/src/OpenFOAM/expressions/value/exprValueFieldTag.H b/src/OpenFOAM/expressions/value/exprValueFieldTag.H index 25f9e29f67..07f8666e49 100644 --- a/src/OpenFOAM/expressions/value/exprValueFieldTag.H +++ b/src/OpenFOAM/expressions/value/exprValueFieldTag.H @@ -57,7 +57,7 @@ class exprValueFieldTag // Private Data //- Uniformity of field (0: empty, 1: uniform, 2: non-uniform, ...) - // Values as per internal enum Foam::Detail::ListPolicy::uniformity + // Values as per internal enum Foam::ListPolicy::uniformity int uniformity_{}; //- Representative (uniform) type/value for the field @@ -134,8 +134,7 @@ public: template void set(const Type* first, const Type* last) { - uniformity_ = - Foam::Detail::ListPolicy::check_uniformity(first, last); + uniformity_ = Foam::ListPolicy::check_uniformity(first, last); if (first != last) // or uniformity_ != EMPTY { @@ -152,7 +151,7 @@ public: template void set_value(const Type& val) { - uniformity_ = Foam::Detail::ListPolicy::uniformity::UNIFORM; + uniformity_ = Foam::ListPolicy::uniformity::UNIFORM; value_.set(val); } diff --git a/src/OpenFOAM/matrices/Matrix/Matrix.H b/src/OpenFOAM/matrices/Matrix/Matrix.H index 6b9e5cce6f..e73fa54d66 100644 --- a/src/OpenFOAM/matrices/Matrix/Matrix.H +++ b/src/OpenFOAM/matrices/Matrix/Matrix.H @@ -621,11 +621,11 @@ Istream& operator>>(Istream& is, Matrix& mat) //- Write Matrix to Ostream, as per Matrix::writeMatrix() with -//- default length, which is given by Detail::ListPolicy::short_length +//- default length, which is given by Foam::ListPolicy::short_length template Ostream& operator<<(Ostream& os, const Matrix& mat) { - return mat.writeMatrix(os, Detail::ListPolicy::short_length::value); + return mat.writeMatrix(os, Foam::ListPolicy::short_length::value); } diff --git a/src/OpenFOAM/primitives/ranges/labelRange/labelRanges.C b/src/OpenFOAM/primitives/ranges/labelRange/labelRanges.C index 148e6b02f7..5c19188832 100644 --- a/src/OpenFOAM/primitives/ranges/labelRange/labelRanges.C +++ b/src/OpenFOAM/primitives/ranges/labelRange/labelRanges.C @@ -395,7 +395,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const labelRanges& list) return list.writeList ( os, - Detail::ListPolicy::short_length::value + Foam::ListPolicy::short_length::value ); }