Share via


<sstream> swap

Exchanges the values between two sstream objects.

template<class Elem, class Tr, class Alloc>
    void swap(
        basic_stringbuf<Elem, Tr, Alloc>& _Left,
        basic_stringbuf<Elem, Tr, Alloc>& _Right
    );
template<class Elem, class Tr, class Alloc>
    void swap(
        basic_istringstream<Elem, Tr, Alloc>& _Left,
        basic_istringstream<Elem, Tr, Alloc>& _Right
    );
template<class Elem, class Tr, class Alloc>
    void swap(
        basic_ostringstream<Elem, Tr, Alloc>& _Left,
        basic_ostringstream<Elem, Tr, Alloc>& _Right
    );
template<class Elem, class Tr, class Alloc>
    void swap(
        basic_stringstream<Elem, Tr, Alloc>& _Left,
        basic_stringstream<Elem, Tr, Alloc>& _Right
    );

Parameters

Parameter

Description

_Left

Reference to an sstream object.

_Right

Reference to an sstream object.

Remarks

The template function executes _Left.swap(_Right).

Requirements

Header: <sstream>

Namespace: std

See Also

Reference

<sstream>

iostream Programming

iostreams Conventions