mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
UList, FixedList: Correct swap member function
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1787
This commit is contained in:
@ -22,8 +22,13 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
Test-List
|
||||
|
||||
Description
|
||||
Simple tests and examples of use of List
|
||||
|
||||
See Also
|
||||
Foam::List
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -75,6 +80,14 @@ int main(int argc, char *argv[])
|
||||
Info<< "list2: " << list2 << nl
|
||||
<< "list3: " << list3 << endl;
|
||||
|
||||
List<vector> list4(IStringStream("((0 1 2) (3 4 5) (6 7 8))")());
|
||||
List<vector> list5(IStringStream("((5 3 1) (10 2 2) (8 1 0))")());
|
||||
Info<< "list4: " << list4 << nl
|
||||
<< "list5: " << list5 << endl;
|
||||
list4.swap(list5);
|
||||
Info<< "Swapped via the swap() method" << endl;
|
||||
Info<< "list4: " << list4 << nl
|
||||
<< "list5: " << list5 << endl;
|
||||
|
||||
// Subset
|
||||
const labelList map(IStringStream("2 (0 2)")());
|
||||
|
||||
Reference in New Issue
Block a user