summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-04-02 20:21:11 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-04-02 20:21:11 +0000
commit38c7a81666eeabc6ea7db1cdc8cf9ff0e3517b82 (patch)
treeae406477429ee6b5a7bc39bc5541f54cb4424820
parentf22146ace4f8ceb206b272479a7a619a27b425ba (diff)
downloadATCD-38c7a81666eeabc6ea7db1cdc8cf9ff0e3517b82.tar.gz
ChangeLogTag: Wed Apr 2 20:15:56 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r--ACE/ChangeLog.iliyan-gestalt11
-rw-r--r--ACE/ace/Intrusive_Auto_Ptr.h17
-rw-r--r--ACE/ace/Intrusive_Auto_Ptr.inl6
3 files changed, 21 insertions, 13 deletions
diff --git a/ACE/ChangeLog.iliyan-gestalt b/ACE/ChangeLog.iliyan-gestalt
index 808998dc562..8afc0a021db 100644
--- a/ACE/ChangeLog.iliyan-gestalt
+++ b/ACE/ChangeLog.iliyan-gestalt
@@ -1,3 +1,14 @@
+Wed Apr 2 20:15:56 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
+
+ * ace/Intrusive_Auto_Ptr.h:
+ * ace/Intrusive_Auto_Ptr.inl:
+
+ Correcting a problem with VC71
+
+ * tests/Intrusive_Auto_Ptr_Test.cpp:
+
+ Unused variable
+
Fri Mar 28 16:13:30 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
* ace/Dynamic_Service_Base.h:
diff --git a/ACE/ace/Intrusive_Auto_Ptr.h b/ACE/ace/Intrusive_Auto_Ptr.h
index 987acf9c750..1097fcc9a67 100644
--- a/ACE/ace/Intrusive_Auto_Ptr.h
+++ b/ACE/ace/Intrusive_Auto_Ptr.h
@@ -51,12 +51,19 @@ class ACE_Intrusive_Auto_Ptr
{
protected:
- /// Used to define a proper boolean conversion
- static void unspecified_bool( ACE_Intrusive_Auto_Ptr<X>***){};
- typedef void (*unspecified_bool_type)( ACE_Intrusive_Auto_Ptr<X>***);
+ /// Used to define a proper boolean conversion for "if (sp) ..."
+ static void unspecified_bool(ACE_Intrusive_Auto_Ptr<X>***){};
+ typedef void (*unspecified_bool_type)(ACE_Intrusive_Auto_Ptr<X>***);
public:
+ /// Enables "if (sp) ..."
+ operator unspecified_bool_type() const
+ {
+ return rep_ == 0 ? 0: unspecified_bool;
+ }
+
+
// = Initialization and termination methods.
/// Constructor that initializes an ACE_Intrusive_Auto_Ptr to
@@ -71,10 +78,6 @@ public:
// Derived class copy ctor
template<class U> ACE_Intrusive_Auto_Ptr(const ACE_Intrusive_Auto_Ptr<U> & rhs);
- // Boolean conversion
- // never throws
- operator unspecified_bool_type() const;
-
/// Destructor. Releases the reference to the underlying representation.
/// If the release of that reference causes its reference count to reach 0,
/// the representation object will also be destroyed.
diff --git a/ACE/ace/Intrusive_Auto_Ptr.inl b/ACE/ace/Intrusive_Auto_Ptr.inl
index 48d14fbab51..64f45e0c3ac 100644
--- a/ACE/ace/Intrusive_Auto_Ptr.inl
+++ b/ACE/ace/Intrusive_Auto_Ptr.inl
@@ -23,12 +23,6 @@ ACE_Intrusive_Auto_Ptr<X>::ACE_Intrusive_Auto_Ptr (const ACE_Intrusive_Auto_Ptr<
X::intrusive_add_ref (rep_);
}
-template <class X> ACE_INLINE
-ACE_Intrusive_Auto_Ptr<X>::operator unspecified_bool_type() const
-{
- return rep_ == 0 ? 0: unspecified_bool;
-}
-
template <class X> ACE_INLINE X *
ACE_Intrusive_Auto_Ptr<X>::operator-> (void) const
{