![]() |
Home | Libraries | People | FAQ | More |
boost::visitor_ptr_t — Adapts a function pointer for use as a static visitor.
// In header: <boost/variant/visitor_ptr.hpp> template<typename T, typename R> class visitor_ptr_t : public static_visitor< { public: // construct/copy/destruct (); // static visitor interfaces (); template<typename U> (); };
Adapts the function given at construction for use as a
static visitor
of type T
with result type R
.
visitor_ptr_t
static visitor interfaces( operand); template<typename U> ();
Effects: |
If passed a value or reference of type
T , it invokes the function given at
construction, appropriately forwarding
operand . |
Returns: |
Returns the result of the function invocation. |
Throws: |
The overload taking a value or reference of type
T throws if the invoked function throws.
The overload taking all other values always
throws bad_visit . |