working typedef
This commit is contained in:
@@ -4,12 +4,17 @@
|
||||
# include "colors.h"
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
|
||||
# include <memory> // std::allocator
|
||||
|
||||
class ftvector {
|
||||
|
||||
public:
|
||||
|
||||
typedef int value_type;
|
||||
typedef std::allocator<int> allocator_type;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
ftvector();
|
||||
ftvector( ftvector const & src );
|
||||
~ftvector();
|
||||
@@ -36,20 +41,17 @@ public:
|
||||
* capacity :
|
||||
************/
|
||||
// size
|
||||
// TMP
|
||||
unsigned int size() const;
|
||||
// TMP END
|
||||
// size_type size() const;
|
||||
size_type size() const;
|
||||
// max_size
|
||||
// size_type max_size() const;
|
||||
// resize
|
||||
// void resize(size_type n, value_type val = value_type());
|
||||
// capacity
|
||||
size_type capacity() const;
|
||||
// size_type capacity() const;
|
||||
// empty
|
||||
// bool empty() const;
|
||||
//reserve
|
||||
// void reserve(size_type n);
|
||||
void reserve(size_type n);
|
||||
|
||||
/******************
|
||||
* element access :
|
||||
@@ -75,10 +77,7 @@ public:
|
||||
// void assign(InputIterator first, InputIterator last);
|
||||
// void assign(size_type n, const value_type& val);
|
||||
// push_back
|
||||
// TMP
|
||||
void push_back(const int & element);
|
||||
// TMP END
|
||||
// void push_back(const value_type& val);
|
||||
void push_back(const value_type & val);
|
||||
// pop_back
|
||||
// void pop_back();
|
||||
// insert
|
||||
@@ -97,9 +96,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
std::size_t _size;
|
||||
int * _mem_ptr;
|
||||
std::allocator<int> _allocator;
|
||||
size_type _size;
|
||||
value_type * _mem_ptr;
|
||||
allocator_type _allocator;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user