共用方式為


swap (<valarray>)

Exchanges the elements of two valarrays.

template<class Type>
    void swap(
        valarray<Type>& _Left,
        valarray<Type>& _Right
    );

Parameters

Parameter

Description

_Left

An object of type valarray.

_Right

An object of type valarray.

Remarks

The template function executes _Left.swap(_Right).

Requirements

Header: <valarray>

Namespace: std

See Also

Reference

<valarray>

Other Resources

C++ Standard Library Header Files