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 with_cached_result

boost::accumulators::with_cached_result

Synopsis

// In header: <boost/accumulators/accumulators_fwd.hpp>

template<typename Accumulator> 
struct with_cached_result : public Accumulator {
  // 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 &);
  ~with_cached_result();

  // 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;
};

Description

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 & r);
  2. result_type const  & get() const;
  3. bool has_result() const;

PrevUpHomeNext