|
Boost : |
Subject: Re: [boost] Interest in StaticVector - fixed capacity vector
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-10-15 06:42:44
Christian Holmquist wrote:
> How much juggling would I need to do to parse a comma separated text of
> integers into a static_vector?
>
> static_vector<int, 4> v;
> spirit::parse("1, 2, 3, 4, 5", int_ % ',', space, v); // undefined
> behaviour???
That's a good example of the sort I had in mind. We could use a vector but
why bother parsing 108 integers when we know that we don't support (or need)
more than four?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk