fix push_back reserve growth
This commit is contained in:
@@ -33,9 +33,9 @@ public:
|
||||
explicit vector (const allocator_type & alloc = allocator_type());
|
||||
explicit vector (size_type n, const value_type& val = value_type(),
|
||||
const allocator_type& alloc = allocator_type());
|
||||
// template <class InputIterator>
|
||||
// vector (InputIterator first, InputIterator last,
|
||||
// const allocator_type& alloc = allocator_type());
|
||||
template <class InputIterator>
|
||||
vector (InputIterator first, InputIterator last,
|
||||
const allocator_type& alloc = allocator_type());
|
||||
vector( vector const & src );
|
||||
// destructor --------------------------------
|
||||
~vector();
|
||||
@@ -95,8 +95,8 @@ public:
|
||||
* modifiers :
|
||||
*************/
|
||||
// assign ------------------------------------
|
||||
//template <class InputIterator>
|
||||
// void assign(InputIterator first, InputIterator last);
|
||||
template <class InputIterator>
|
||||
void assign(InputIterator first, InputIterator last);
|
||||
void assign(size_type n, const value_type& val);
|
||||
// push_back ---------------------------------
|
||||
void push_back(const value_type & val);
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
// swap --------------------------------------
|
||||
//void swap(vector& x);
|
||||
// clear -------------------------------------
|
||||
//void clear();
|
||||
void clear();
|
||||
|
||||
|
||||
private:
|
||||
@@ -129,9 +129,8 @@ private:
|
||||
|
||||
//std::ostream & operator<<(std::ostream & o, vector const & rhs);
|
||||
|
||||
}
|
||||
} // namespace ft
|
||||
|
||||
# include "vector.tpp"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user