[pdal] Boost compile failure under MSVC 2010 : droppable
accumulator (boost ticket 6535)
Michael Rosen
michael.rosen at gmail.com
Thu Feb 9 18:48:47 EST 2012
Just got back from the codesprint at Islandwood. One thing we found out is
that you could not build under windows. We've got a work around checked
into include/pdal/filters/Stats.hpp but that's not fixing the problem.
I'm re-posting here in the hopes that someone (Mateuz?) could offer some
insight into this:
https://svn.boost.org/trac/boost/ticket/6535
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;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pdal/attachments/20120209/4425ffad/attachment.html
More information about the pdal
mailing list