summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-04-02 20:23:32 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-04-02 20:23:32 +0000
commitf8cbf5ee774cd15fd6dc9a64b003cbc50b71f1dd (patch)
tree95a16880bc81380167a5f3d328d90496f7479204
parentab390dce6cf87b084b5895da4825c84e624c14d6 (diff)
downloadATCD-f8cbf5ee774cd15fd6dc9a64b003cbc50b71f1dd.tar.gz
ChangeLogTag: Wed Apr 2 20:22:50 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r--ACE/ChangeLog7
-rw-r--r--ACE/ace/Intrusive_Auto_Ptr.h17
-rw-r--r--ACE/ace/Intrusive_Auto_Ptr.inl6
3 files changed, 17 insertions, 13 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 81d0c8831fc..89b7da8ee37 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,10 @@
+Wed Apr 2 20:22:50 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
+
+ * ace/Intrusive_Auto_Ptr.h:
+ * ace/Intrusive_Auto_Ptr.inl:
+
+ Correcting a problem with VC71
+
Wed Apr 2 11:06:30 UTC 2008 Vladimir Zykov <vladimir.zykov@prismtech.com>
* bin/tao_orb_tests.lst:
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
{