Boost logo

Ublas :

Subject: Re: [ublas] fixed size vector in boost::numeric::ublas?
From: Markus Grabner (grabner_at_[hidden])
Date: 2010-08-05 19:58:55


Jesse Perla wrote:

> Markus Grabner <grabner <at> icg.tugraz.at> writes:
>
>> Modifying the behaviour of c_vector might result in existing code showing
>> differnt runtime behaviour, which is very bad. Just removing the class
>> will at least make sure that existing code can no longer be compiled (and
>> silently misbehave), such that the developer is forced to consider
>> alternatives, which is less bad IMO.
>
> Fair enough (and to be honest I hate the name c_vector... as described
> above
> I didn't figure out what it is until too late). But what kind of existing
> code breaks would happen? Wouldn't it fulfill the same interface
> entirely?
The current c_vector allows to freely resize it within its bounds. If code
depends on this feature, and we change c_vector to fixed size, this code
will still compile (if we keep resize()), but fail at runtime.

        Kind regards,
                Markus

-- 
Markus Grabner
Institute for Computer Graphics and Vision
Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria
WWW: http://www.icg.tugraz.at/Members/grabner