diff -Naur boost130a/intrusive_ptr.hpp boost130b/intrusive_ptr.hpp --- boost130a/intrusive_ptr.hpp Wed Jan 22 16:22:30 2003 +++ boost130b/intrusive_ptr.hpp Thu May 15 13:48:14 2003 @@ -119,6 +119,12 @@ return p_; } +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { + return p_ != 0; + } +#else typedef T * (intrusive_ptr::*unspecified_bool_type) () const; operator unspecified_bool_type () const @@ -131,6 +137,7 @@ { return p_ == 0; } +#endif void swap(intrusive_ptr & rhs) { diff -Naur boost130a/scoped_array.hpp boost130b/scoped_array.hpp --- boost130a/scoped_array.hpp Mon Feb 10 13:54:42 2003 +++ boost130b/scoped_array.hpp Thu May 15 13:49:37 2003 @@ -82,7 +82,12 @@ } // implicit conversion to "bool" - +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { + return ptr != 0; + } +#else typedef T * (this_type::*unspecified_bool_type)() const; operator unspecified_bool_type() const // never throws @@ -94,6 +99,7 @@ { return ptr == 0; } +#endif void swap(scoped_array & b) // never throws { diff -Naur boost130a/scoped_ptr.hpp boost130b/scoped_ptr.hpp --- boost130a/scoped_ptr.hpp Mon Feb 10 13:54:44 2003 +++ boost130b/scoped_ptr.hpp Thu May 15 13:52:08 2003 @@ -101,7 +101,12 @@ } // implicit conversion to "bool" - +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { + return ptr != 0; + } +#else typedef T * (this_type::*unspecified_bool_type)() const; operator unspecified_bool_type() const // never throws @@ -113,7 +118,7 @@ { return ptr == 0; } - +#endif void swap(scoped_ptr & b) // never throws { T * tmp = b.ptr; diff -Naur boost130a/shared_array.hpp boost130b/shared_array.hpp --- boost130a/shared_array.hpp Wed Oct 23 17:55:16 2002 +++ boost130b/shared_array.hpp Thu May 15 11:59:52 2003 @@ -93,7 +93,12 @@ } // implicit conversion to "bool" - +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { + return px != 0; + } +#else typedef T * (this_type::*unspecified_bool_type)() const; operator unspecified_bool_type() const // never throws @@ -105,6 +110,7 @@ { return px == 0; } +#endif bool unique() const // never throws { diff -Naur boost130a/shared_ptr.hpp boost130b/shared_ptr.hpp --- boost130a/shared_ptr.hpp Mon Feb 3 14:48:34 2003 +++ boost130b/shared_ptr.hpp Thu May 15 13:59:40 2003 @@ -245,7 +245,12 @@ } // implicit conversion to "bool" - +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { + return px != 0; + } +#else typedef T * (this_type::*unspecified_bool_type)() const; operator unspecified_bool_type() const // never throws @@ -259,6 +264,7 @@ { return px == 0; } +#endif bool unique() const // never throws {