On Thu, Nov 6, 2008 at 4:17 PM, Roy Stogner <[EMAIL PROTECTED]> wrote: > > Does anyone know which STL vector operations exist reduce capacity()? As far > as I know swap() and reserve() are the only ways to do so, but I'd hate to > find out that some resize() implementation also "helpfully" reduced capacity > for you when we don't want it to.
The only way to *guarantee* capacity reduction is to swap with an empty vector. There may be some STL implementations which reduce capacity in other ways, but this would not be efficient in a lot of cases and I don't know of any which do so. -- John ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
