Christopher wrote:
can someone refresh my meory on what std::size_t is used for? I am wondering
if my template container class should have it's capacity as a size_t or an
int?
'size_t' ('std::size_t') is a type that can be used to hold a size of
any object in C/C++ program. Since an array in C/C++ is an object
itself, this type can also be used to store the size of an array. But in
generic case the concepts of "object size" and "container size" are
orthogonal and this type should not be used to store the size of a
container (number of elements).
--
Best regards,
Andrey Tarasevich