
Robert Mecklenburg napisał(a):
int main(int , char **) { boost::array
barray; std::cout << sizeof(barray) << std::endl; std::tr1::array tr1array; std::cout << sizeof(tr1array) << std::endl; } When run this code produces:
g++ foo.cpp && ./a.out 6 16
That is, the boost array is exactly the size I require 6 bytes, but the tr1 array is larger, 16 bytes.
the array is fine, just check the size() and use data().
implementation details are not our business.
$ cat test.cpp
#include