|
Boost Users : |
From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2007-08-21 14:28:29
Panayiotis wrote:
> Ovanes Markarian wrote:
>> There is no equivalent, since boost::array must be parametrisized with
>> the size. So boost::array<std::string, 10> has different type as
>> boost::array<std::string, 11>.
>>
>> You might be able to use:
>>
>> template<int ArraySize_>
>> void foo(boost::array<int, ArraySize_> const&);
>>
>> But this depeneds if you know the size of your array at compile time.
>>
>> Using std::vector<int> might be of more value ;)
>>
>> Best Regards,
>> Ovanes
>
> The problem is that:
> a) I don't know the size at compile time.
> b) Once initialized, the array's size stays constant, so vector would be
> overkill.
Why is std::vector an overkill, if I may ask? What makes it heavier than
C array?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net