STYLE: qualify Swap with Foam:: prefix (visibility)

- drop unnecessary Foam::Swap specializations when MoveConstructible
  and MoveAssignable already apply. The explicit redirect to swap
  member functions was needed before proper move semantics where
  added.

  Removed specializations: autoPtr, refPtr, tmp, UList.
  Retained specialization: DynamicList, FixedList.

     Special handling for DynamicList is only to accommodate dissimilar
     sizing template parameters (which probably doesn't occur in
     practice).
     Special handling for FixedList to apply element-wise swapping.

- use std::swap for primitives. No need to mask with Foam::Swap wrapper
This commit is contained in:
Mark Olesen
2023-08-11 13:25:51 +02:00
parent fabd3f4e0c
commit eeb9d144e3
22 changed files with 94 additions and 88 deletions

View File

@ -68,7 +68,7 @@ void runSwapTest
for (label iLoop = 0; iLoop < nLoops; ++iLoop)
{
Swap(list1, list2);
Foam::Swap(list1, list2);
}
Info<< "output 1: " << list1.first() << nl;