![]() |
Home | Libraries | People | FAQ | More |
boost::xpressive::let — For binding local variables to placeholders in semantic actions when constructing a regex_iterator
or a regex_token_iterator
.
// In header: <boost/xpressive/regex_actions.hpp> template< ArgBindings> ( args);
xpressive::let()
serves the same purpose as match_results::let()
; that is, it binds a placeholder to a local value. The purpose is to allow a regex with semantic actions to be defined that refers to objects that do not yet exist. Rather than referring directly to an object, a semantic action can refer to a placeholder, and the value of the placeholder can be specified later with a let expression. The let expression created with let()
is passed to the constructor of either
or regex_iterator
.regex_token_iterator
See the section "Referring to Non-Local Variables" in the Users' Guide for more discussion.
Example:
// Define a placeholder for a map object: placeholder<std::map<std::string, int> > sregex sregex_iterator sregex_iterator
The above code displays:
Parameters: |
|