I am talking about the 2 dimensions.

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/index/rtree.hpp>

namespace bg = boost::geometry;
namespace bgi = boost::geometry::index;

template <int CompileTimeDimension>
void do_something()
{
    typedef bg::model::point<float, CompileTimeDimension, bg::cs::cartesian> point;
    bgi::rtree<point, bgi::linear<8> > rt;
}


int main()
{
    int M;
    M = 100;
    if ( M == 100 )
        do_something<100>();
        else if ( M == 10000 )
        do_something<10000>();
        else
        std::cerr << "invalid dimension!";
    return 0;
}

and here is the first lines of the errors
In file included from ../boost/geometry/strategies/cartesian/centroid_weighted_length.hpp:23:0,
                 from ../boost/geometry/strategies/strategies.hpp:33,
                 from ../boost/geometry/geometry.hpp:35,
                 from ../boost/geometry.hpp:17,
                 from bla.cpp:66:
../boost/geometry/geometries/point.hpp: In static member function ‘static CoordinateType boost::geometry::traits::access<boost::geometry::model::point$
..

I am attaching the errors.