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.

Struct template with_cached_result



// In header: <boost/accumulators/framework/accumulators/droppable_accumulator.hpp>

template<typename Accumulator> 
struct with_cached_result {
  // types
  typedef Accumulator::result_type result_type;

  // construct/copy/destruct
  template<typename Args> with_cached_result(Args const &);
  with_cached_result(with_cached_result const &);
  with_cached_result& operator=(with_cached_result const &);

  // public member functions
  template<typename Args> void on_drop(Args const &) ;
  template<typename Args> result_type result(Args const &) const;

  // private member functions
  void set(result_type const &) ;
  result_type const & get() const;
  bool has_result() const;


with_cached_result public construct/copy/destruct

  1. template<typename Args> with_cached_result(Args const & args);
  2. with_cached_result(with_cached_result const & that);
  3. with_cached_result& operator=(with_cached_result const &);
  4. ~with_cached_result();

with_cached_result public member functions

  1. template<typename Args> void on_drop(Args const & args) ;
  2. template<typename Args> result_type result(Args const & args) const;

with_cached_result private member functions

  1. void set(result_type const & result) ;
  2. result_type const & get() const;
  3. bool has_result() const;