Re: [Boost-bugs] [Boost C++ Libraries] #3543: Example code using Boost accumulators fails to compile with GCC 4.4.1 (Fedora 11)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3543: Example code using Boost accumulators fails to compile with GCC 4.4.1 (Fedora 11)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-24 09:52:05


#3543: Example code using Boost accumulators fails to compile with GCC 4.4.1
(Fedora 11)
--------------------------------------------------------+-------------------
  Reporter: Denis Arnaud <denis.arnaud_boost@…> | Owner: eric_niebler
      Type: Bugs | Status: closed
 Milestone: Boost 1.41.0 | Component: accumulator
   Version: Boost 1.39.0 | Severity: Problem
Resolution: fixed | Keywords: accumulator template tag moment
--------------------------------------------------------+-------------------

Comment (by Stefan van Kessel <van_kessel@…>):

 The fix applied was faulty. Either using namespace boost; has to be added,
 too or moment has to be fully qualified like boost::accumulators::moment.
 Right now there's only using namespace boost::accumulators; and moment is
 qualified accumulators::moment which fails because the namespace
 accumulators is not available at that scope.

 It's a minor issue but the fix is so easy that I think it's worth
 applying.
 --- accumulators.qbk (revision 65571)
 +++ accumulators.qbk (working copy)
 @@ -101,7 +101,7 @@

          // Display the results ...
          std::cout << "Mean: " << mean(acc) << std::endl;
 - std::cout << "Moment: " << accumulators::moment<2>(acc) <<
 std::endl;
 + std::cout << "Moment: " << boost::accumulators::moment<2>(acc) <<
 std::endl;
          return 0;
      }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3543#comment:2>
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:04 UTC