首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::valarray::valarray

valarray();

(1)

?

explicit valarray( std::size_t count );

(2)

?

valarray( const T& val, std::size_t count );

(3)

?

valarray( const T* vals, std::size_t count );

(4)

?

valarray( const valarray& other );

(5)

?

valarray( valarray&& other );

(6)

(since C++11)

valarray( const std::slice_array<T>& );

(7)

?

valarray( const std::gslice_array<T>& );

(8)

?

valarray( const std::mask_array<T>& );

(9)

?

valarray( const std::indirect_array<T>& );

(10)

?

valarray( std::initializer_list<T> il );

(11)

(since C++11)

从各种来源构造新的数字数组。

1%29默认构造函数。构造一个空的数字数组。

2%29构造一个数字数组count值初始化元素的副本。

3%29构造一个数字数组count副本val...

4%29构造一个数字数组,其副本为count指向的数组的值。vals如果此数组包含的内容少于count值时,行为是未定义的。

5%29复制构造函数。的内容的副本构造数字数组。other...

6%29移动构造函数。的内容构造容器。other使用移动语义。

7-10%29转换构造函数将相应的数据结构转换为valarray...

11%29使用初始化程序列表的内容构造数字数组。il...

参数

count

-

the number of elements to construct

val

-

the value to initialize the elements with

vals

-

pointer to a C array to use as source to initialize the contents

other

-

another numeric array to use as source to initialize the contents

il

-

initializer list to initialize the elements with

例外

1-5%29%280%29

6%29

noexcept规格:

noexcept

7-11%29%280%29

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com