#ifndef ACCU_A_INCLUDED #define ACCU_A_INCLUDED #include #include #include #include #include namespace boost { namespace accumulators { namespace tag{ struct kwd_value_; } namespace{ template struct kwd{ static ::boost::parameter::keyword& value; }; template ::boost::parameter::keyword& kwd::value = ::boost::parameter::keyword::get(); } namespace impl { //////////////////////////////////////////////////////////////////////////// // accu_a_impl template class accu_a_impl : public accumulator_base { public: typedef Sample result_type; template accu_a_impl(Args const &args) :x_( args[kwd::value] ) { } accu_a_impl(const accu_a_impl& that) :x_(that.x_){} accu_a_impl& operator=(const accu_a_impl& that){ if(&that!=this){ x_ = that.x_; } return *this; } template void operator ()(Args const &args) { } result_type result(dont_care) const { return x_; } private: result_type x_; }; } // namespace impl /////////////////////////////////////////////////////////////////////////////// // tag::accu_a // namespace tag { template struct accu_a : depends_on<> { /// INTERNAL ONLY typedef accumulators::impl::accu_a_impl impl; }; } }} // namespace boost::accumulators #endif