V
Vincent RICHOMME
Hi,
I would like to create a class called ArrayPtr that could only store
pointers. How can I be sure that arguments passed is a pointer ?
template<typename T> class ArrayPtr : public std::vector<T>
{
public:
inline void Add(T object)
{
push_back(object);
}
inline void Clear()
{
clear();
}
int GetCount()
{
return size();
}
};
The goal is to empty my vector and to deallocate pointer when I call
Clear().
I would like to create a class called ArrayPtr that could only store
pointers. How can I be sure that arguments passed is a pointer ?
template<typename T> class ArrayPtr : public std::vector<T>
{
public:
inline void Add(T object)
{
push_back(object);
}
inline void Clear()
{
clear();
}
int GetCount()
{
return size();
}
};
The goal is to empty my vector and to deallocate pointer when I call
Clear().