/*}}}*/
#ifndef SMART_POINTER_H
#define SMART_POINTER_H
+#include <apt-pkg/macros.h>
template <class T>
-class SPtr
+class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtr
{
public:
T *Ptr;
};
template <class T>
-class SPtrArray
+class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtrArray
{
public:
T *Ptr;
inline SPtrArray(T *Ptr) : Ptr(Ptr) {};
inline SPtrArray() : Ptr(0) {};
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+ // gcc warns about this, but we can do nothing hereā¦
+#endif
inline ~SPtrArray() {delete [] Ptr;};
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic pop
+#endif
};
#endif