Boost C++ Libraries

...one 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.
PrevUpHomeNext

Struct template callable

boost::type_erasure::callable

Synopsis

// In header: <boost/type_erasure/callable.hpp>

template<typename Sig, typename F = _self> 
struct callable {

  // public static functions
  static R apply(F &, T...);
};

Description

The callable concept allows an any to hold function objects. Sig is interpreted in the same way as for Boost.Function, except that the arguments and return type are allowed to be placeholders. F must be a placeholder.

Multiple instances of callable can be used simultaneously. Overload resolution works normally. Note that unlike Boost.Function, callable does not provide result_type. It does, however, support boost::result_of.

callable public static functions

  1. static R apply(F & f, T... arg);

    R is the result type of Sig and T is the argument types of Sig.


PrevUpHomeNext