22 #include <boost/serialization/nvp.hpp> 23 #include <boost/serialization/vector.hpp> 35 template<
typename VALUE>
37 typename internal::FastDefaultVectorAllocator<VALUE>::type> {
41 typedef std::vector<VALUE,
42 typename internal::FastDefaultVectorAllocator<VALUE>::type> Base;
59 template<
typename INPUTITERATOR>
60 explicit FastVector(INPUTITERATOR first, INPUTITERATOR last) {
65 Base::assign(first, last);
74 template<
typename ALLOCATOR>
80 Base::assign(x.begin(), x.end());
84 operator std::vector<VALUE>()
const {
85 return std::vector<VALUE>(this->begin(), this->end());
90 friend class boost::serialization::access;
91 template<
class ARCHIVE>
92 void serialize(ARCHIVE & ar,
const unsigned int ) {
93 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
FastVector(size_t size, const VALUE &initial)
Constructor from size and initial values.
Definition: FastVector.h:54
FastVector()
Default constructor.
Definition: FastVector.h:45
FastVector(size_t size)
Constructor from size.
Definition: FastVector.h:49
Definition: FastVector.h:36
An easy way to control which allocator is used for Fast* collections.
FastVector(const Base &x)
Copy constructor from the base class.
Definition: FastVector.h:69
FastVector(const std::vector< VALUE, ALLOCATOR > &x)
Copy constructor from a standard STL container.
Definition: FastVector.h:75
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
FastVector(INPUTITERATOR first, INPUTITERATOR last)
Constructor from a range, passes through to base class.
Definition: FastVector.h:60