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

Struct fallback_to_none

boost::log::fallback_to_none

Synopsis

// In header: <boost/log/attributes/fallback_policy.hpp>


struct fallback_to_none {

  enum @0 { guaranteed_result = = false };

  // public static functions
  template<typename FunT> static bool apply_default(FunT &);
  template<typename FunT> static bool apply_default(FunT const &);
  static void on_invalid_type(type_info_wrapper const &);
  static void on_missing_value();
};

Description

The fallback_to_none policy results in returning an empty value reference if the attribute value cannot be extracted.

fallback_to_none public static functions

  1. template<typename FunT> static bool apply_default(FunT &);

    The method is called in order to apply a function object to the default value.

  2. template<typename FunT> static bool apply_default(FunT const &);

    The method is called in order to apply a function object to the default value.

  3. static void on_invalid_type(type_info_wrapper const &);

    The method is called when value extraction failed because the attribute value has different type than requested.

  4. static void on_missing_value();

    The method is called when value extraction failed because the attribute value was not found.


PrevUpHomeNext