Boost C++ Libraries: Ticket #11441: Documentation sample error https://svn.boost.org/trac10/ticket/11441 <p> User'd guide. </p> <blockquote> <p> Accumulators sample program: </p> </blockquote> <p> #include &lt;iostream&gt; #include &lt;boost/accumulators/accumulators.hpp&gt; #include &lt;boost/accumulators/statistics/stats.hpp&gt; #include &lt;boost/accumulators/statistics/mean.hpp&gt; #include &lt;boost/accumulators/statistics/moment.hpp&gt; using namespace boost::accumulators; </p> <p> int main() { </p> <blockquote> <p> <em> Define an accumulator set for calculating the mean and the </em> 2nd moment ... accumulator_set&lt;double, stats&lt;tag::mean, tag::moment&lt;2&gt; &gt; &gt; acc; </p> </blockquote> <blockquote> <p> <em> push in some data ... acc(1.2); acc(2.3); acc(3.4); acc(4.5); </em></p> </blockquote> <blockquote> <p> <em> Display the results ... std::cout &lt;&lt; "Mean: " &lt;&lt; mean(acc) &lt;&lt; std::endl; std::cout &lt;&lt; "Moment: " &lt;&lt; accumulators::moment&lt;2&gt;(acc) &lt;&lt; std::endl; </em></p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> In a line "std::cout &lt;&lt; "Moment: " &lt;&lt; accumulators::moment&lt;2&gt;(acc) &lt;&lt; std::endl;" name of namespace "accumulators" should be removed because namespace "accumulators" is already used. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11441 Trac 1.4.3 Daniel James Thu, 14 Jan 2016 00:12:26 GMT owner, component changed https://svn.boost.org/trac10/ticket/11441#comment:1 https://svn.boost.org/trac10/ticket/11441#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Matias Capeletto</span> to <span class="trac-author">Eric Niebler</span> </li> <li><strong>component</strong> <span class="trac-field-old">Documentation</span> → <span class="trac-field-new">accumulator</span> </li> </ul> Ticket