ENH: remove Foam::Swap specializations for HashSet, HashTable

- without these will use the normal move construct + move assign.
  This is similarly efficient, but avoids the inadvertently having the
  incorrect Swap being used for derived classes.

STYLE: remove unused xfer methods for HashTable, HashSet

- unneeded since move construct and move assignment are possible
This commit is contained in:
Mark Olesen
2018-01-25 12:13:16 +01:00
parent 7ee93afe9e
commit 915e8c9f35
9 changed files with 84 additions and 148 deletions

View File

@ -98,11 +98,12 @@ int main()
}
HashTable<scalar> table2(table1);
HashTable<scalar> table3(std::move(table1));
HashTable<scalar> table2(table1); // Copy
HashTable<scalar> table3(std::move(table1)); // Move
Info<< "\ncopy table1 -> table2" << nl
<< "transfer table1 -> table3 via the xfer() method" << nl;
Info<< nl
<< "copy table1 -> table2" << nl
<< "move table1 -> table3" << nl;
Info<< "\ntable1" << table1 << nl
<< "\ntable2" << table2 << nl