first implementation, badly, of allocator
This commit is contained in:
34
headers/ftvector.hpp
Normal file
34
headers/ftvector.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef FTVECTOR_HPP
|
||||
# define FTVECTOR_HPP
|
||||
|
||||
# include "colors.h"
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
# include <memory> // std::allocator
|
||||
|
||||
class ftvector {
|
||||
|
||||
public:
|
||||
|
||||
ftvector();
|
||||
ftvector( ftvector const & src );
|
||||
~ftvector();
|
||||
ftvector & operator=( ftvector const & rhs );
|
||||
|
||||
unsigned int size() const;
|
||||
void push_back(const int & element);
|
||||
|
||||
private:
|
||||
|
||||
unsigned int _size;
|
||||
int * _mem_ptr;
|
||||
std::allocator<int> _allocator;
|
||||
|
||||
// static std::string const ftvector::_bar;
|
||||
|
||||
};
|
||||
|
||||
//std::ostream & operator<<(std::ostream & o, ftvector const & rhs);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# define TESTS_H
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
# define TEST(s) \
|
||||
{\
|
||||
|
||||
Reference in New Issue
Block a user