diff --git a/applications/test/UList/Test-UList.C b/applications/test/UList/Test-UList.C index 667e624529..cbb35472fc 100644 --- a/applications/test/UList/Test-UList.C +++ b/applications/test/UList/Test-UList.C @@ -115,7 +115,22 @@ int main(int argc, char *argv[]) Info<<"UList: "; print(ulist); } + { + Foam::identityOp ident; + + Info<< nl << "identityOp as functor or array/map" << nl; + + for (const label val : labelRange(5)) + { + Info<< "value:" << val + << " () = " << ident(val) + << " [] = " << ident[val] << nl; + } + } + + Info<< "\nEnd\n" << nl; return 0; } + // ************************************************************************* // diff --git a/applications/test/pTraits/Test-pTraits.C b/applications/test/pTraits/Test-pTraits.C index 6b4c4a5a54..78494ab6a9 100644 --- a/applications/test/pTraits/Test-pTraits.C +++ b/applications/test/pTraits/Test-pTraits.C @@ -34,6 +34,7 @@ Description #include "boolVector.H" // A FixedList pretending to be a vector #include "vector.H" #include "tensor.H" +#include "complex.H" #include "uLabel.H" #include "Switch.H" @@ -110,6 +111,7 @@ void printTraits() << " vector-space=" << Switch::name(is_vectorspace::value) << " is_label=" << Switch::name(is_contiguous_label::value) << " is_scalar=" << Switch::name(is_contiguous_scalar::value) + << " cmptType=" << typeid(typename pTraits_cmptType::type).name() << endl; } @@ -120,6 +122,12 @@ void printTraits(const pTraits& p) Info<< p.typeName << " == " << p << endl; } +template +void printDecltype() +{ + Info<< "cmptType : " << typeid(T).name() << nl; +} + #pragma GCC diagnostic warning "-Wmaybe-uninitialized" #pragma GCC diagnostic warning "-Wuninitialized" @@ -129,12 +137,16 @@ int main() printTraits(); printTraits