value<> is a lazy wrapper for a value that can be used in xpressive semantic actions.
More...
#include <xpressive_fwd.hpp>


Public Types | |
| typedef proto::extends < typename proto::terminal< T > ::type, value< T > > | base_type |
| INTERNAL ONLY. More... | |
Public Member Functions | |
| value () | |
Store a default-constructed T. More... | |
| value (T const &t) | |
Store a copy of t. More... | |
| T & | get () |
| T const & | get () const |
| Fetch the stored value. More... | |
value<> is a lazy wrapper for a value that can be used in xpressive semantic actions.
| T | The type of the value to store. |
Below is an example that shows where is useful.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.
| typedef proto::extends<typename proto::terminal<T>::type, value<T> > boost::xpressive::value< T >::base_type |
INTERNAL ONLY.
|
inline |
Store a default-constructed T.
|
inlineexplicit |
Store a copy of t.
| t | The initial value. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References boost::proto::value().
|
inline |
Fetch the stored value.
References boost::proto::value().