]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/scoped_ptr.hpp
update to boost 1.30.1
[lyx.git] / boost / boost / scoped_ptr.hpp
index 19396a59ffb58c6acbac8892f78b6ef4ef98f3f5..429d295c04a1c93b9d52ebe47fa9727f2a245d8d 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/checked_delete.hpp>
+#include <boost/detail/workaround.hpp>
 
 #ifndef BOOST_NO_AUTO_PTR
 # include <memory>          // for std::auto_ptr
@@ -102,6 +103,15 @@ public:
 
     // implicit conversion to "bool"
 
+#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
+
+    operator bool () const
+    {
+        return ptr != 0;
+    }
+
+#else
+
     typedef T * (this_type::*unspecified_bool_type)() const;
 
     operator unspecified_bool_type() const // never throws
@@ -109,6 +119,8 @@ public:
         return ptr == 0? 0: &this_type::get;
     }
 
+#endif
+
     bool operator! () const // never throws
     {
         return ptr == 0;