##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::mask_array::operator=

From cppreference.com
< cpp‎ | numeric‎ | valarray‎ | mask array

[edit template]

void operator=( const T& value ) const; | (1) |
void operator=( const std::valarray<T>& val_arr ) const; | (2) |
const mask_array& operator=( const mask_array& sl_arr) const; | (3) | (since C++11)

Assigns values to all referred elements.

1) Assigns `value` to all of the elements.
2) Assigns the elements of `val_arr` to the referred to elements of *this.
3) Assigns the selected elements from `sl_arr` to the referred to elements of *this.

### [edit] Parameters

value | - | a value to assign to all of the referred elements
val_arr | - | std::valarray to assign
sl_arr | - | std::mask_array to assign

### [edit] Return value

1-2) (none)
3) *this

### [edit] Exceptions

(none)

### [edit] Example

| This section is incomplete Reason: no example

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/numeric/valarray/mask_array/operator%3D&oldid=61557"
Category:

- Todo no example