summaryrefslogtreecommitdiff
path: root/src/array_fun.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-03 23:23:22 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-03 23:23:22 +0900
commit7e6db8d801973bfc62b80f411f14d1d332a1f7aa (patch)
tree9ace3886df397907d113b97ec132e64f6729ea02 /src/array_fun.h
parentdf0034f1cd5a3c642fba65f228da7ca0674161b8 (diff)
Use std::unique_ptr instead of array_ptr
Diffstat (limited to 'src/array_fun.h')
-rw-r--r--src/array_fun.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/array_fun.h b/src/array_fun.h
index ed562ed8..b8054c36 100644
--- a/src/array_fun.h
+++ b/src/array_fun.h
@@ -53,45 +53,6 @@ char (&char_array_ref_fun(T (&)[0u]))[0u];
// To calculate size of array at compile time, we use macro here.
#define A2_ARRAY_LEN(X) sizeof(char_array_ref_fun(X))
-template<typename T>
-class array_ptr {
-private:
- T* array_;
-
- // Copies are not allowed. Let's make them private.
- array_ptr(const array_ptr& s);
-
- array_ptr& operator=(const array_ptr& s);
-
- template<typename S>
- array_ptr& operator=(const array_ptr<S>& s);
-
-public:
- array_ptr():array_(0) {}
-
- explicit array_ptr(T* array):array_(array) {}
-
- ~array_ptr()
- {
- delete [] array_;
- }
-
- operator T*()
- {
- return array_;
- }
-
- operator const T*() const
- {
- return array_;
- }
-
- void reset(T* array)
- {
- array_ = array;
- }
-};
-
template<typename T, size_t N>
class array_wrapper {
private: