Add deprecated mark to "DPL::AutoPtr"
authorJihoon Chung <jihoon.chung@samsaung.com>
Thu, 10 Oct 2013 11:51:35 +0000 (20:51 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 11 Oct 2013 03:13:53 +0000 (03:13 +0000)
[Issue#]     N/A
[Problem]    DPL::AutoPtr should replace to use standard library.
[Cause]      After C++11 is enabled, std::unique_ptr and std::shared_ptr is available.
             DPL::AutoPtr isn't necessary to exist in the DPL.
[Solution]   To announce deprecated, add DPL_DEPRECATED macro to constructor.
[SCMRequest] N/A

Change-Id: Ic715039cb67cbd5295d7ba6e1768af1f876c0a35

modules/core/include/dpl/auto_ptr.h

index f5838d8..3d23091 100644 (file)
@@ -27,6 +27,8 @@
 #include <set>
 #include <string>
 
+#include <dpl/availability.h>
+
 namespace DPL {
 /*
  * base deleter func
@@ -48,7 +50,7 @@ template <typename T>
 class AutoPtr
 {
   public:
-    AutoPtr(T *ptr) :
+    DPL_DEPRECATED_WITH_MESSAGE("use std::unique_ptr or std::shared_ptr") AutoPtr(T *ptr) :
         m_data(ptr)
     {}