Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home Manuals on-line PGI Compiler pgC_lib swap
Personal tools
Document Actions

swap



Click on the banner to return to the class reference home page.

swap


Algorithm

Summary

Exchange values.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

None

Synopsis

#include <algorithm>

template <class T>
 void swap (T& a, T& b);

Description

The swap algorithm exchanges the values of a and b. The effect is:

T tmp = a
a = b
b = tmp

See Also

iter_swap, swap_ranges


©Copyright 1996, Rogue Wave Software, Inc.


Powered by Plone This site conforms to the following standards: