std::gslice_array<T>:: operator=
From cppreference.net
<
cpp
|
numeric
|
valarray
|
gslice array
C++
Numerics library
| Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data-parallel types (SIMD) (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::gslice_array
| Member functions | ||||
|
gslice_array::operator=
|
||||
|
void
operator
=
(
const
T
&
value
)
const
;
|
(1) | |
|
void
operator
=
(
const
std::
valarray
<
T
>
&
val_arr
)
const
;
|
(2) | |
|
const
gslice_array
&
operator
=
(
const
gslice_array
&
other_arr
)
const
;
|
(3) | |
为所有被引用元素赋值。
1)
将
value
赋值给所有元素。
2)
将
val_arr
的元素赋值给
*
this
所指向的元素。
3)
将
other_arr
中选定的元素赋值给
*
this
所指向的元素。
目录 |
参数
| value | - | 要赋值给所有引用元素的值 |
| val_arr | - | 要赋值的 std::valarray |
| other_arr | - | 要赋值的 std::gslice_array |
返回值
1,2)
(无)
3)
*
this
示例
|
本节内容不完整
原因:缺少示例 |
缺陷报告
以下行为变更缺陷报告被追溯应用于先前发布的C++标准。
| 缺陷报告 | 适用范围 | 发布时行为 | 正确行为 |
|---|---|---|---|
| LWG 123 | C++98 | 重载 (2) 为非 const 版本 | 改为 const 版本 |
| LWG 253 | C++98 | 拷贝赋值运算符为私有成员 | 改为公有成员 |
| LWG 621 | C++98 | 拷贝赋值运算符为非 const 版本 | 改为 const 版本 |