mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user