![]() |
Home | Libraries | People | FAQ | More |
boost::xpressive::value — value<> is a lazy wrapper for a value that can be used in xpressive semantic actions.
// In header: <boost/xpressive/regex_actions.hpp> template<typename T> struct value : public { // public member functions (); (); (); () ; };
Below is an example that shows where is useful. value<>
; // Use val() to hold the shared_ptr by value: [ ++*(
In the above code, xpressive::val() is a function that returns a value<> object. Had val() not been used here, the operation ++*pi would have been evaluated eagerly once, instead of lazily when the regex match happens.