[英]what's the size of std::tr1::array<int, 16> >
I wonder how to get the size of std::tr1::array<int, 16> >
? 我想知道如何获取
std::tr1::array<int, 16> >
的大小?
is it just 16*sizeof(int)
, which is how 16 byte? 仅仅是
16*sizeof(int)
,这是16字节吗?
尝试sizeof(std::tr1::array<int, 16> >)
Yes, std::tr1::array
is guaranteed to be an aggregate type that wraps the underlying raw array, which in fact you can access with the data()
member function. 是的,保证
std::tr1::array
是封装底层原始数组的聚合类型,实际上您可以使用data()
成员函数进行访问。 And the size of a raw array is the number of elements times the size of one element. 原始数组的大小是元素数乘以一个元素的大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.