artemp/mapnik — Issue #760: const qualifier on mapnik::raster constructor
Author: artemp
Created: 2011-10-11 16:35:38+00:00
State: open
Labels: Core_Library

moving to boost::make_shared in gdal_featureset we hit:

{{{

In file included from plugins/input/gdal/gdal_featureset.cpp:25:
In file included from include/mapnik/feature_factory.hpp:29:
In file included from /opt/boost-st/include/boost/make_shared.hpp:15:
/opt/boost-st/include/boost/smart_ptr/make_shared.hpp:225:17: error: no matching constructor for initialization of
'mapnik::raster'
::new( pv ) T( a1, a2 );
^ ~~~~~~
plugins/input/gdal/gdal_featureset.cpp:210:56: note: in instantiation of function template specialization
'boost::make_shared, mapnik::ImageData >' requested here
feature->set_raster(mapnik::raster_ptr(boost::make_shared(intersect,image)));
^
include/mapnik/raster.hpp:34:5: note: candidate constructor not viable: 2nd argument ('const mapnik::ImageData')
would lose const qualifier
raster(box2d const& ext,image_data_32 & data)
^
include/mapnik/raster.hpp:30:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument,
but 2 were provided
struct raster
^
1 error generated.
scons: *** [plugins/input/gdal/gdal_featureset.os] Error 1
}}}