Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
array/std::array/boost::array example 1: comparison is a comparison between a plain array, std::array, std::tr1::array and boost::array.
The conclusions draws are (note that every 'Yes' is 'a good thing'):
Property tested | Statically allocated plain array | Dynamically allocated plain array | std::tr1::array | std::array | boost::array |
Initialization at creation | Yes | No | Yes | Yes | Yes |
Initialization at creation checked against too few elements | No | N/A | No | No | No |
Initialization at creation checked against too many elements | Yes | N/A | Yes | Yes | Yes |
Size requestable at compile-time | Yes | No | No | Yes | No |
Size requestable at run-time | Yes | No | Yes | Yes | Yes |
Operating system(s) or programming environment(s)
Libraries used:
include(../../ConsoleApplication.pri) |
#include <array> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
This page has been created by the tool CodeToHtml