Update of /cvsroot/boost/boost/boost/xpressive
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12864
Modified Files:
regex_actions.hpp
Log Message:
add xpressive::if_() for user-defined predicates
Index: regex_actions.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/xpressive/regex_actions.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- regex_actions.hpp 22 Mar 2007 22:15:29 -0000 1.2
+++ regex_actions.hpp 23 Mar 2007 00:09:05 -0000 1.3
@@ -18,6 +18,7 @@
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/core/state.hpp>
#include <boost/xpressive/detail/core/matcher/action_matcher.hpp>
+#include <boost/xpressive/detail/core/matcher/predicate_matcher.hpp>
namespace boost { namespace xpressive
{
@@ -192,6 +193,14 @@
return proto::as_arg(t);
}
+ template<typename Predicate>
+ typename proto::terminal<detail::predicate_placeholder<Predicate> >::type
+ if_(Predicate const &pred)
+ {
+ detail::predicate_placeholder<Predicate> p = {pred};
+ return proto::as_expr(p);
+ }
+
}}
#endif // BOOST_XPRESSIVE_ACTIONS_HPP_EAN_03_22_2007
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs