23 #include <boost/utility/enable_if.hpp>
24 #include <boost/serialization/nvp.hpp>
25 #include <boost/serialization/list.hpp>
37 template<
typename VALUE>
38 class FastList:
public std::list<VALUE, typename internal::FastDefaultAllocator<VALUE>::type> {
42 typedef std::list<VALUE, typename internal::FastDefaultAllocator<VALUE>::type> Base;
48 template<
typename INPUTITERATOR>
49 explicit FastList(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
57 #ifdef GTSAM_ALLOCATOR_BOOSTPOOL
59 FastList(
const std::list<VALUE>& x) {
64 Base::assign(x.begin(), x.end());
69 operator std::list<VALUE>()
const {
70 return std::list<VALUE>(this->begin(), this->end());
75 friend class boost::serialization::access;
76 template<
class ARCHIVE>
77 void serialize(ARCHIVE & ar,
const unsigned int version) {
78 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
FastList(const FastList< VALUE > &x)
Copy constructor from another FastList.
Definition: FastList.h:52
FastList(INPUTITERATOR first, INPUTITERATOR last)
Constructor from a range, passes through to base class.
Definition: FastList.h:49
An easy way to control which allocator is used for Fast* collections.
FastList(const Base &x)
Copy constructor from the base list class.
Definition: FastList.h:55
FastList()
Default constructor.
Definition: FastList.h:45
Definition: FastList.h:38