[Boost-bugs] [Boost C++ Libraries] #6535: MS VS 2010 compile failure using a droppable accumulator

Subject: [Boost-bugs] [Boost C++ Libraries] #6535: MS VS 2010 compile failure using a droppable accumulator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-02-08 20:00:52


#6535: MS VS 2010 compile failure using a droppable accumulator
-------------------------------------+--------------------------------------
 Reporter: michael.rosen@… | Owner: eric_niebler
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: accumulator
  Version: Boost 1.48.0 | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 We are using Boost 1.48.0 and found a compilation failure on Windows using
 VS 2010. The project builds properly on Linux and OSX. I've provided a
 concise repro below. In short

  - a plain density accumulator is OK
  - a droppable density accumulator fails to compile (missing operator)
  - a droppable sum accumulator is OK.

 {{{
 #include <boost/accumulators/accumulators.hpp>
 #include <boost/accumulators/statistics/density.hpp>
 #include <boost/accumulators/statistics/stats.hpp>
 #include <boost/accumulators/statistics/sum.hpp>
 using namespace boost;
 using namespace accumulators;
 // OK. Plain density accumulator. Compiles fine on VStudio 2010, boost
 v1.48.0
 //typedef accumulator_set<double, features<tag::density> > DensityAcc;

 // NG. Droppable density accumulator causes "error C2676: binary '[' :
 'const boost::accumulators::droppable_accumulator<Accumulator>' does not
 define this operator or a conversion to a type acceptable to the
 predefined operator"
 typedef accumulator_set<double, features< droppable<tag::density>> >
 DensityAcc;

 // OK. Droppable sum accumulator seems OK.
 // typedef accumulator_set<double, features< droppable<tag::sum>> >
 SumAcc;

 int main()
 {
   DensityAcc myAccumulator( tag::density::num_bins = 20,
 tag::density::cache_size = 10);
   //SumAcc myAccumulator;
   return 0;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6535>
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:08 UTC