|
Boost Users : |
Subject: [Boost-users] std::vector and default constructor
From: peter_foelsche_at_[hidden]
Date: 2008-11-21 15:31:56
It would be helpful to have something like std::vector which allows one to pass some argument which is in turn passed to the constructor of every element so that not the default constructor is being called.
This would be helpful for e.g. objects located in memory created by memory mapped files.
Peter
"The first point (using an init() function in preference to a constructor) is bogus. Using constructors and exception handling is a more general and systematic way of dealing with resource acquisition and initialization errors. This style is a relic of pre-exception C++." -- Stroustrup
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