Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58281 - trunk/boost/xpressive
From: eric_at_[hidden]
Date: 2009-12-10 20:10:04


Author: eric_niebler
Date: 2009-12-10 20:10:03 EST (Thu, 10 Dec 2009)
New Revision: 58281
URL: http://svn.boost.org/trac/boost/changeset/58281

Log:
disable proto's unary operator& for basic_regex objects, references #3712
Text files modified:
   trunk/boost/xpressive/basic_regex.hpp | 10 +++++++++-
   1 files changed, 9 insertions(+), 1 deletions(-)

Modified: trunk/boost/xpressive/basic_regex.hpp
==============================================================================
--- trunk/boost/xpressive/basic_regex.hpp (original)
+++ trunk/boost/xpressive/basic_regex.hpp 2009-12-10 20:10:03 EST (Thu, 10 Dec 2009)
@@ -17,6 +17,9 @@
 
 #include <boost/config.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/proto/traits.hpp>
+#include <boost/proto/domain.hpp>
+#include <boost/proto/generate.hpp>
 #include <boost/xpressive/xpressive_fwd.hpp>
 #include <boost/xpressive/regex_constants.hpp>
 #include <boost/xpressive/detail/detail_fwd.hpp>
@@ -42,6 +45,10 @@
     {
         BOOST_XPR_ENSURE_(!stack_error, regex_constants::error_stack, "Regex stack space exhausted");
     }
+
+ struct basic_regex_domain
+ : proto::domain<proto::default_generator, proto::not_<proto::address_of<proto::_> > >
+ {};
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -53,11 +60,12 @@
   : proto::extends<
         typename proto::terminal<detail::tracking_ptr<detail::regex_impl<BidiIter> > >::type
       , basic_regex<BidiIter>
+ , detail::basic_regex_domain
>
 {
 private:
     typedef typename proto::terminal<detail::tracking_ptr<detail::regex_impl<BidiIter> > >::type pimpl_type;
- typedef proto::extends<pimpl_type, basic_regex<BidiIter> > base_type;
+ typedef proto::extends<pimpl_type, basic_regex<BidiIter>, detail::basic_regex_domain > base_type;
 
 public:
     typedef BidiIter iterator_type;


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