I can not create a point in d(in the code M is dimensions) dimensions.
The error is this:
error: the value of ‘M’ is not usable in a constant expression
note: ‘int M’ is not const
error: template argument 2 is invalid
and the line is this:
int M;
..
typedef bg::model::point point;
Then, I am trying to create an Rtree (I have already the data in a 2D
array), like this:
// create the rtree using default constructor
bgi::rtree< point, bgi::quadratic<16> > rtree;
point tmp;
for ( unsigned i = 0 ; i < N ; ++i )
{
// insert new value
for(int j = 0 ; j < M ; ++j) {
bg::set<M>(tmp, a[i][j]);
}
rtree.insert(tmp);
}
and I think the error is in insert(). I am attaching a file with the
minimal code and one with the errors I receive (I receive another one
too).
I am struggling to achieve that all day long. :/