Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / ORB_Core_Auto_Ptr.h
blobdad591b2a09678ed6ae3759b4ad4d2178ee78fb6
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file ORB_Core_Auto_Ptr.h
7 * @author DOC Center - Washington University at St. Louis
8 * @author DOC Laboratory - University of California at Irvine
9 */
10 // ===================================================================
12 #ifndef TAO_ORB_CORE_AUTO_PTR_H
13 #define TAO_ORB_CORE_AUTO_PTR_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "tao/TAO_Export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include /**/ "tao/Versioned_Namespace.h"
24 #include <memory>
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
28 class TAO_ORB_Core;
30 /**
31 * Custom deleter to decrement the refcount when called
33 struct TAO_Export TAO_ORB_Core_Decr_Refcnt
35 void operator()(TAO_ORB_Core* core) const;
38 /**
39 * TAO_ORB_Core_Auto_Ptr will decrement the refcount when going our of scope
40 * using std::unique_ptr and a custom deleter
42 using TAO_ORB_Core_Auto_Ptr = std::unique_ptr<TAO_ORB_Core, TAO_ORB_Core_Decr_Refcnt>;
44 TAO_END_VERSIONED_NAMESPACE_DECL
46 #include /**/ "ace/post.h"
48 #endif /* TAO_ORB_CORE_AUTO_PTR_H */