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 to view this page for the latest version.

Class template static_type_dispatcher

boost::log::static_type_dispatcher — A static type dispatcher class.


// In header: <boost/log/utility/type_dispatch/static_type_dispatcher.hpp>

template<typename T> 
class static_type_dispatcher {
  // construct/copy/destruct
  template<typename ReceiverT> explicit static_type_dispatcher(ReceiverT &);
  static_type_dispatcher(static_type_dispatcher const &) = delete;
  static_type_dispatcher& operator=(static_type_dispatcher const &) = delete;


The type dispatcher can be used to pass objects of arbitrary types from one component to another. With regard to the library, the type dispatcher can be used to extract attribute values.

Static type dispatchers allow to specify one or several supported types at compile time.

static_type_dispatcher public construct/copy/destruct

  1. template<typename ReceiverT> 
      explicit static_type_dispatcher(ReceiverT & receiver);

    Constructor. Initializes the dispatcher internals.

  2. static_type_dispatcher(static_type_dispatcher const &) = delete;
  3. static_type_dispatcher& operator=(static_type_dispatcher const &) = delete;