Update of /cvsroot/boost/boost/boost/xpressive
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28520

Modified Files:
        regex_actions.hpp regex_primitives.hpp 
Log Message:
xpressive::by_ref() and xpressive::ref() are funtionally equivalent and both 
are proto-ified versions of boost::ref(), local<> doesn't require default 
constructable

Index: regex_actions.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/regex_actions.hpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- regex_actions.hpp   27 Apr 2007 07:11:02 -0000      1.16
+++ regex_actions.hpp   30 Apr 2007 00:28:21 -0000      1.17
@@ -17,6 +17,7 @@
 #include <boost/ref.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/int.hpp>
+#include <boost/noncopyable.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/type_traits/is_const.hpp>
 #include <boost/xpressive/detail/detail_fwd.hpp>
@@ -390,34 +391,24 @@
 
     template<typename T>
     struct local
-      : detail::value_wrapper<T>
-      , proto::extends<typename proto::terminal<reference_wrapper<T> >::type, 
local<T> >
+      : private noncopyable
+      , detail::value_wrapper<T>
+      , proto::terminal<reference_wrapper<T> >::type
     {
-        typedef proto::extends<typename proto::terminal<reference_wrapper<T> 
>::type, local<T> > base_type;
+        typedef typename proto::terminal<reference_wrapper<T> >::type 
base_type;
 
         local()
-          : detail::value_wrapper<T>()
-          , 
base_type(base_type::type::make(boost::ref(detail::value_wrapper<T>::value)))
+          : noncopyable()
+          , detail::value_wrapper<T>()
+          , 
base_type(base_type::make(boost::ref(detail::value_wrapper<T>::value)))
         {}
 
         explicit local(T const &t)
-          : detail::value_wrapper<T>(t)
-          , 
base_type(base_type::type::make(boost::ref(detail::value_wrapper<T>::value)))
-        {}
-
-        // copies refer to the value in that, not this!
-        local(local const &that)
-          : detail::value_wrapper<T>()
-          , base_type(that)
+          : noncopyable()
+          , detail::value_wrapper<T>(t)
+          , 
base_type(base_type::make(boost::ref(detail::value_wrapper<T>::value)))
         {}
 
-        // copies refer to the value in that, not this!
-        local &operator =(local const &that)
-        {
-            *static_cast<base_type *>(this) = *static_cast<base_type const 
*>(&that);
-            return *this;
-        }
-
         using base_type::operator =;
 
         T &get()

Index: regex_primitives.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/regex_primitives.hpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- regex_primitives.hpp        17 Apr 2007 05:02:32 -0000      1.29
+++ regex_primitives.hpp        30 Apr 2007 00:28:21 -0000      1.30
@@ -441,13 +441,11 @@
 ///
 /// \param rex The basic_regex object to embed by reference.
 template<typename BidiIter>
-inline typename proto::terminal<detail::regex_byref_placeholder<BidiIter> 
>::type const
+inline typename proto::terminal<reference_wrapper<basic_regex<BidiIter> const> 
>::type const
 by_ref(basic_regex<BidiIter> const &rex)
 {
-    typedef detail::core_access<BidiIter> access;
-    shared_ptr<detail::regex_impl<BidiIter> > impl = 
access::get_regex_impl(rex);
-    detail::regex_byref_placeholder<BidiIter> rex_ref(impl);
-    return proto::terminal<detail::regex_byref_placeholder<BidiIter> 
>::type::make(rex_ref);
+    reference_wrapper<basic_regex<BidiIter> const> ref(rex);
+    return proto::terminal<reference_wrapper<basic_regex<BidiIter> const> 
>::type::make(ref);
 }
 
 ///////////////////////////////////////////////////////////////////////////////


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to