Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
Function template visitor_ptr
c++boost.gif (8819 bytes)HomeLibrariesPeopleFAQMore

Function template visitor_ptr

boost::visitor_ptr — Returns a visitor object that adapts function pointers for use as a static visitor.


template<typename R, typename T> visitor_ptr_t<T,R> visitor_ptr(R (*)(T) );


Constructs and returns a visitor_ptr_t adaptor over the given function.

Returns: Returns a visitor_ptr_t visitor object that, when applied, invokes the given function.
Throws: Will not throw. (Note, however, that the returned visitor object may throw when applied.)

Last revised: , at GMTCopyright © 2002, 2003 Eric Friedman, Itay Maman