Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82334 - in branches/release: . boost boost/xpressive boost/xpressive/detail/utility
From: eric_at_[hidden]
Date: 2013-01-03 13:26:46


Author: eric_niebler
Date: 2013-01-03 13:26:44 EST (Thu, 03 Jan 2013)
New Revision: 82334
URL: http://svn.boost.org/trac/boost/changeset/82334

Log:
merge [82103] from trunk, fixes #7809, permission from Marshall
Properties modified:
   branches/release/ (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost/xpressive/ (props changed)
Text files modified:
   branches/release/boost/xpressive/detail/utility/tracking_ptr.hpp | 17 ++++++++++++-----
   branches/release/boost/xpressive/regex_error.hpp | 2 +-
   2 files changed, 13 insertions(+), 6 deletions(-)

Modified: branches/release/boost/xpressive/detail/utility/tracking_ptr.hpp
==============================================================================
--- branches/release/boost/xpressive/detail/utility/tracking_ptr.hpp (original)
+++ branches/release/boost/xpressive/detail/utility/tracking_ptr.hpp 2013-01-03 13:26:44 EST (Thu, 03 Jan 2013)
@@ -434,18 +434,25 @@
         return this->impl_->self_;
     }
 
+ // smart-pointer operators
     #if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
- typedef bool unspecified_bool_type;
+
+ operator bool() const
+ {
+ return this->impl_;
+ }
+
     #else
- typedef typename intrusive_ptr<element_type>::unspecified_bool_type unspecified_bool_type;
- #endif
 
- // smart-pointer operators
+ typedef intrusive_ptr<element_type> tracking_ptr::* unspecified_bool_type;
+
     operator unspecified_bool_type() const
     {
- return this->impl_;
+ return this->impl_ ? &tracking_ptr::impl_ : 0;
     }
 
+ #endif
+
     bool operator !() const
     {
         return !this->impl_;

Modified: branches/release/boost/xpressive/regex_error.hpp
==============================================================================
--- branches/release/boost/xpressive/regex_error.hpp (original)
+++ branches/release/boost/xpressive/regex_error.hpp 2013-01-03 13:26:44 EST (Thu, 03 Jan 2013)
@@ -107,7 +107,7 @@
 }
 
 #define BOOST_XPR_ENSURE_(pred, code, msg) \
- boost::xpressive::detail::ensure_(pred, code, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) \
+ boost::xpressive::detail::ensure_(!!(pred), code, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) \
     /**/
 
 }} // namespace boost::xpressive


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk