Update of /cvsroot/boost/boost/boost/xpressive/detail/static
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28520/detail/static
Modified Files:
is_pure.hpp placeholders.hpp transmogrify.hpp visitor.hpp
width_of.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: is_pure.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/is_pure.hpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- is_pure.hpp 29 Apr 2007 03:38:48 -0000 1.20
+++ is_pure.hpp 30 Apr 2007 00:28:21 -0000 1.21
@@ -13,6 +13,7 @@
# pragma once
#endif
+#include <boost/ref.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/assert.hpp>
@@ -65,6 +66,16 @@
: mpl::false_ // basic_regex
{};
+ template<typename BidiIter>
+ struct is_terminal_pure<reference_wrapper<basic_regex<BidiIter> >, false>
+ : mpl::false_ // basic_regex
+ {};
+
+ template<typename BidiIter>
+ struct is_terminal_pure<reference_wrapper<basic_regex<BidiIter> const>,
false>
+ : mpl::false_ // basic_regex
+ {};
+
///////////////////////////////////////////////////////////////////////////////
// is_pure
//
Index: placeholders.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/placeholders.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- placeholders.hpp 23 Mar 2007 00:09:05 -0000 1.7
+++ placeholders.hpp 30 Apr 2007 00:28:21 -0000 1.8
@@ -43,22 +43,6 @@
};
///////////////////////////////////////////////////////////////////////////////
-// regex_byref_placeholder
-//
-template<typename BidiIter>
-struct regex_byref_placeholder
-{
- BOOST_XPR_QUANT_STYLE(quant_variable_width, unknown_width::value, false)
-
- shared_ptr<regex_impl<BidiIter> > impl_;
-
- regex_byref_placeholder(shared_ptr<regex_impl<BidiIter> > const &impl)
- : impl_(impl)
- {
- }
-};
-
-///////////////////////////////////////////////////////////////////////////////
// posix_charset_placeholder
//
struct posix_charset_placeholder
Index: transmogrify.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/transmogrify.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- transmogrify.hpp 15 Apr 2007 06:40:25 -0000 1.1
+++ transmogrify.hpp 30 Apr 2007 00:28:21 -0000 1.2
@@ -206,14 +206,26 @@
};
template<typename BidiIter, typename ICase, typename Traits>
- struct transmogrify<BidiIter, ICase, Traits,
regex_byref_placeholder<BidiIter> >
+ struct transmogrify<BidiIter, ICase, Traits,
reference_wrapper<basic_regex<BidiIter> > >
{
typedef regex_byref_matcher<BidiIter> type;
template<typename Matcher2>
static type call(Matcher2 const &m, dont_care)
{
- return type(m.impl_);
+ return
type(detail::core_access<BidiIter>::get_regex_impl(m.get()));
+ }
+ };
+
+ template<typename BidiIter, typename ICase, typename Traits>
+ struct transmogrify<BidiIter, ICase, Traits,
reference_wrapper<basic_regex<BidiIter> const> >
+ {
+ typedef regex_byref_matcher<BidiIter> type;
+
+ template<typename Matcher2>
+ static type call(Matcher2 const &m, dont_care)
+ {
+ return
type(detail::core_access<BidiIter>::get_regex_impl(m.get()));
}
};
Index: visitor.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/visitor.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- visitor.hpp 15 Apr 2007 06:40:25 -0000 1.1
+++ visitor.hpp 30 Apr 2007 00:28:21 -0000 1.2
@@ -13,6 +13,7 @@
# pragma once
#endif
+#include <boost/ref.hpp>
#include <boost/mpl/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
@@ -63,10 +64,16 @@
{
}
- void visit_(regex_byref_placeholder<BidiIter> const &rex)
+ void visit_(reference_wrapper<basic_regex<BidiIter> > const &rex)
{
// when visiting an embedded regex, track the references
- this->self_->track_reference(*rex.impl_);
+
this->self_->track_reference(*detail::core_access<BidiIter>::get_regex_impl(rex.get()));
+ }
+
+ void visit_(reference_wrapper<basic_regex<BidiIter> const> const &rex)
+ {
+ // when visiting an embedded regex, track the references
+
this->self_->track_reference(*detail::core_access<BidiIter>::get_regex_impl(rex.get()));
}
void visit_(tracking_ptr<regex_impl<BidiIter> > const &rex)
Index: width_of.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/detail/static/width_of.hpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- width_of.hpp 29 Apr 2007 03:38:48 -0000 1.18
+++ width_of.hpp 30 Apr 2007 00:28:21 -0000 1.19
@@ -13,6 +13,7 @@
# pragma once
#endif
+#include <boost/ref.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/plus.hpp>
@@ -87,6 +88,16 @@
: unknown_width // basic_regex
{};
+ template<typename BidiIter>
+ struct width_of_terminal<reference_wrapper<basic_regex<BidiIter> >, false>
+ : unknown_width // basic_regex
+ {};
+
+ template<typename BidiIter>
+ struct width_of_terminal<reference_wrapper<basic_regex<BidiIter> const>,
false>
+ : unknown_width // basic_regex
+ {};
+
///////////////////////////////////////////////////////////////////////////////
// width_of
//
-------------------------------------------------------------------------
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