Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82103 - in trunk/boost/xpressive: . detail/utility
From: eric_at_[hidden]
Date: 2012-12-19 13:57:28


Author: eric_niebler
Date: 2012-12-19 13:57:28 EST (Wed, 19 Dec 2012)
New Revision: 82103
URL: http://svn.boost.org/trac/boost/changeset/82103

Log:
accomodate recent changes to boost's smart pointers, refs #7809
Text files modified:
   trunk/boost/xpressive/detail/utility/tracking_ptr.hpp | 17 ++++++++++++-----
   trunk/boost/xpressive/regex_error.hpp | 2 +-
   2 files changed, 13 insertions(+), 6 deletions(-)

Modified: trunk/boost/xpressive/detail/utility/tracking_ptr.hpp
==============================================================================
--- trunk/boost/xpressive/detail/utility/tracking_ptr.hpp (original)
+++ trunk/boost/xpressive/detail/utility/tracking_ptr.hpp 2012-12-19 13:57:28 EST (Wed, 19 Dec 2012)
@@ -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: trunk/boost/xpressive/regex_error.hpp
==============================================================================
--- trunk/boost/xpressive/regex_error.hpp (original)
+++ trunk/boost/xpressive/regex_error.hpp 2012-12-19 13:57:28 EST (Wed, 19 Dec 2012)
@@ -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