what's the size of std::tr1::array<int, 16> >

陌路散爱 提交于 2019-12-24 10:56:36

问题


I wonder how to get the size of std::tr1::array<int, 16> >?

is it just 16*sizeof(int), which is how 16 byte?


回答1:


Try sizeof(std::tr1::array<int, 16> >)




回答2:


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. And the size of a raw array is the number of elements times the size of one element.



来源:https://stackoverflow.com/questions/11854477/whats-the-size-of-stdtr1arrayint-16

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!