[Boost-bugs] [Boost C++ Libraries] #11441: Documentation sample error

Subject: [Boost-bugs] [Boost C++ Libraries] #11441: Documentation sample error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-01 12:46:04


#11441: Documentation sample error
------------------------------+----------------------------
 Reporter: ampoznyak@… | Owner: matias
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Documentation
  Version: Boost 1.58.0 | Severity: Not Applicable
 Keywords: |
------------------------------+----------------------------
 User'd guide.

  Accumulators sample program:

 #include <iostream>
 #include <boost/accumulators/accumulators.hpp>
 #include <boost/accumulators/statistics/stats.hpp>
 #include <boost/accumulators/statistics/mean.hpp>
 #include <boost/accumulators/statistics/moment.hpp>
 using namespace boost::accumulators;

 int main()
 {
     // Define an accumulator set for calculating the mean and the
     // 2nd moment ...
     accumulator_set<double, stats<tag::mean, tag::moment<2> > > acc;

     // push in some data ...
     acc(1.2);
     acc(2.3);
     acc(3.4);
     acc(4.5);

     // Display the results ...
     std::cout << "Mean: " << mean(acc) << std::endl;
     std::cout << "Moment: " << accumulators::moment<2>(acc) << std::endl;

     return 0;
 }

 In a line "std::cout << "Moment: " << accumulators::moment<2>(acc) <<
 std::endl;"
 name of namespace "accumulators" should be removed because namespace
 "accumulators" is already used.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11441>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC