diff --git a/applications/test/List/Make/files b/applications/test/List/Make/files index 35935365d6ce51a23fdc323baa35cbead14f5e43..44da0672c1ec1793f2a0ae750137bec2b4727907 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 74b3701e546bfcef18dfc449dbb616e84a9eb7d0..9b747a5395e799ef898edf977757d16f4aecd83c 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<short> : std::integral_constant<int,20> {}; } // End namespace ListPolicy -} // End namespace Detail } // End namespace Foam @@ -119,9 +116,9 @@ Ostream& printListOutputType(const char* what) Info<< what << " (contiguous=" << is_contiguous_v<T> << " no_linebreak=" - << Detail::ListPolicy::no_linebreak<T>::value + << ListPolicy::no_linebreak<T>::value << " short_length=" - << Detail::ListPolicy::short_length<T>::value << ')'; + << ListPolicy::short_length<T>::value << ')'; return Info; } diff --git a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H index cc88ba4c38c7fc998e59c337685bcbddd3423d3f..b55c7313ca2ca95eaeae4a7c2babdc6f5e6a4f9b 100644 --- a/src/OpenFOAM/containers/Bits/PackedList/PackedList.H +++ b/src/OpenFOAM/containers/Bits/PackedList/PackedList.H @@ -610,11 +610,11 @@ struct Hash<PackedList<Width>> : PackedList<Width>::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<unsigned Width> Ostream& operator<<(Ostream& os, const PackedList<Width>& list) { - return list.writeList(os, Detail::ListPolicy::short_length<void>::value); + return list.writeList(os, Foam::ListPolicy::short_length<void>::value); } diff --git a/src/OpenFOAM/containers/Buffers/CircularBufferIO.C b/src/OpenFOAM/containers/Buffers/CircularBufferIO.C index 3bb903e415788ad4656193acc3372f3c05b1ca9b..18dbe29db5ee5a154095bf4fe3f68f6bf93041dc 100644 --- a/src/OpenFOAM/containers/Buffers/CircularBufferIO.C +++ b/src/OpenFOAM/containers/Buffers/CircularBufferIO.C @@ -136,7 +136,7 @@ Foam::Ostream& Foam::CircularBuffer<T>::writeList || ( (len <= shortLen) - && (is_contiguous_v<T> || Detail::ListPolicy::no_linebreak<T>::value) + && (is_contiguous_v<T> || Foam::ListPolicy::no_linebreak<T>::value) ) ) { diff --git a/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H b/src/OpenFOAM/containers/CompactLists/CompactListList/CompactListList.H index b270f200709f3ccb9d68fab7a8d0501ab8400e39..e0a1fb03de0ee32e848a401fc7026e3d05e8ea9a 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<T>& list) template<class T> Ostream& operator<<(Ostream& os, const CompactListList<T>& list) { - return list.writeList(os, Detail::ListPolicy::short_length<T>::value); + return list.writeList(os, Foam::ListPolicy::short_length<T>::value); } diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C index ba4f9298b12ce2ec06dfdffe6b556ff10f42fce3..eda9072524eec1b614f7c252b0555437a7a912bc 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C @@ -379,7 +379,7 @@ Foam::HashSet<Key, Hash>::operator-=(const HashSet<Key, Hash>& rhs) template<class Key, class Hash> Foam::Ostream& Foam::operator<<(Ostream& os, const HashSet<Key, Hash>& rhs) { - return rhs.writeKeys(os, Detail::ListPolicy::short_length<Key>::value); + return rhs.writeKeys(os, Foam::ListPolicy::short_length<Key>::value); } diff --git a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBase.H b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBase.H index 03ea65004c4440a3455f3cf4192b953c455983de..e575982af916494e1c8415039bf9ca1d1a9fa883 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<class T, class Addr> Ostream& operator<<(Ostream& os, const IndirectListBase<T, Addr>& list) { - return list.writeList(os, Detail::ListPolicy::short_length<T>::value); + return list.writeList(os, Foam::ListPolicy::short_length<T>::value); } diff --git a/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C b/src/OpenFOAM/containers/IndirectLists/IndirectListBase/IndirectListBaseIO.C index 1978873331c916db107bab9edd3102aa4073d85c..620cd63ced7e83e986bd317361ca1fdc7478aed4 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<T, Addr>::writeList || ( (len <= shortLen) - && (is_contiguous_v<T> || Detail::ListPolicy::no_linebreak<T>::value) + && (is_contiguous_v<T> || Foam::ListPolicy::no_linebreak<T>::value) ) ) { diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H index e5db26282098012e19884a1363c10fe2b1b5ec6b..8d8d818b95a5c0c74a257e10b12546c080c7b7a6 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<T, N>& 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<class T, unsigned N> Ostream& operator<<(Ostream& os, const FixedList<T, N>& list) { - return list.writeList(os, Detail::ListPolicy::short_length<T>::value); + return list.writeList(os, Foam::ListPolicy::short_length<T>::value); } diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C index 161498d9a94e7b37e2e09e6d6587c01329722c21..7277a5d63fe7a3ea1f93e24e80bf7660e2b5ce6e 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<T, N>::writeList || ( (N <= unsigned(shortLen)) - && (is_contiguous_v<T> || Detail::ListPolicy::no_linebreak<T>::value) + && (is_contiguous_v<T> || Foam::ListPolicy::no_linebreak<T>::value) ) ) { diff --git a/src/OpenFOAM/containers/Lists/List/UList.H b/src/OpenFOAM/containers/Lists/List/UList.H index e027fb35fb39b223fd2c5a008020292c710f3389..ede6083323db801a9b5c054416513c751aa5f688 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<T>& 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<class T> Ostream& operator<<(Ostream& os, const UList<T>& list) { - return list.writeList(os, Detail::ListPolicy::short_length<T>::value); + return list.writeList(os, Foam::ListPolicy::short_length<T>::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 1a7ed4385db1910df35aae5db5e3bbb99e0859f2..bd85943a7f0d8be1b6fab879f428a5076fd7e326 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<T>::writeList || ( (len <= shortLen) - && (is_contiguous_v<T> || Detail::ListPolicy::no_linebreak<T>::value) + && (is_contiguous_v<T> || Foam::ListPolicy::no_linebreak<T>::value) ) ) { diff --git a/src/OpenFOAM/containers/Lists/policy/ListPolicy.H b/src/OpenFOAM/containers/Lists/policy/ListPolicy.H index 81b3c106b2b51bfca5d855d1b7b2c0324e5e205e..1482c155f944923f6e2429f317ebfd3816057f17 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 <http://www.gnu.org/licenses/>. 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 0e739b8a869e7db6fd82dfe4146fb9f14571ced2..04286b7126789a6699bd8052ca1c01408c84c39b 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<bitmask_type> ( - Foam::Detail::ListPolicy::uniformity::EMPTY + Foam::ListPolicy::uniformity::EMPTY ) ) { @@ -156,7 +156,7 @@ void Foam::expressions::exprValueFieldTag::reduce() ( shape == static_cast<bitmask_type> ( - 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 25f9e29f67bb33e095f8d6e689d24ce40c7231b6..07f8666e496809b17708de0b37f5c473d1b2605d 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<class Type> 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<class Type> void set_value(const Type& val) { - uniformity_ = Foam::Detail::ListPolicy::uniformity::UNIFORM; + uniformity_ = Foam::ListPolicy::uniformity::UNIFORM; value_.set<Type>(val); } diff --git a/src/OpenFOAM/matrices/Matrix/Matrix.H b/src/OpenFOAM/matrices/Matrix/Matrix.H index 6b9e5cce6fa5aa153d88c33cfe0d1a9f41d2ed5a..e73fa54d66a519c1a4eb11afa8aed526afe10089 100644 --- a/src/OpenFOAM/matrices/Matrix/Matrix.H +++ b/src/OpenFOAM/matrices/Matrix/Matrix.H @@ -621,11 +621,11 @@ Istream& operator>>(Istream& is, Matrix<Form, Type>& 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<class Form, class Type> Ostream& operator<<(Ostream& os, const Matrix<Form, Type>& mat) { - return mat.writeMatrix(os, Detail::ListPolicy::short_length<Type>::value); + return mat.writeMatrix(os, Foam::ListPolicy::short_length<Type>::value); } diff --git a/src/OpenFOAM/primitives/ranges/labelRange/labelRanges.C b/src/OpenFOAM/primitives/ranges/labelRange/labelRanges.C index 148e6b02f70f5e455b2bddade602a1d88cf01fd7..5c19188832b9e84c6a6121cf6c0c35a2a306ec84 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<labelRange>::value + Foam::ListPolicy::short_length<labelRange>::value ); }