Re: [Boost-bugs] [Boost C++ Libraries] #3492: Code using Boost accumulators fails to compile in ubuntu amd64 gcc 4.4.1

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3492: Code using Boost accumulators fails to compile in ubuntu amd64 gcc 4.4.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-30 15:21:51


#3492: Code using Boost accumulators fails to compile in ubuntu amd64 gcc 4.4.1
-------------------------------------+--------------------------------------
  Reporter: ramon.casellas@… | Owner: eric_niebler
      Type: Bugs | Status: closed
 Milestone: Boost 1.41.0 | Component: accumulator
   Version: Boost 1.40.0 | Severity: Regression
Resolution: invalid | Keywords: accumulator template tag error_of moment
-------------------------------------+--------------------------------------
Changes (by eric_niebler):

  * status: new => closed
  * resolution: => invalid

Comment:

 Recent versions of gcc take a very "interesting" and unfortunate
 interpretation of C++'s name lookup rules, and you're getting bitten by
 them. Since the invocations of 'error_of' and 'moment' have (some of)
 their template parameters explicitly specified, name look-up is finding
 the *types* 'error_of' and 'moment' in addition to the functions, and the
 ambiguity is causing an error. This is a problem with gcc's peculiar
 interpretation of name look-up, not a problem in accumulators.

 You can work around the problem by adding namespace qualification to the
 invocations of 'error_of' and 'moment':

 {{{
   namespace acc = boost::accumulators;
   acc::moment<2>(acc);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3492#comment:1>
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:01 UTC