/ / Zwiększ błąd Rtree C2228 - c ++, boost

Zwiększ błąd Rtree C2228 - c ++, boost

Próbuję utworzyć drzewo dystansowe za pomocą biblioteki boost, Oto mój kod:

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/index/rtree.hpp>
#include <vector>
#include <iostream>
#include <boost/foreach.hpp>

namespace bg = boost::geometry;
namespace bgi = boost::geometry::index;
typedef bg::model::point<float, 2, bg::cs::cartesian> point;

typedef bg::model::box<point> box;
typedef std::pair<box, unsigned> value;

// create the rtree using default constructor
int main(){
bgi::rtree< value, bgi::linear<16> > rtree;
return 0;
}

Ale pojawia się ten błąd:

Błąd 1 błędu C2228: po lewej od ".select_on_container_copy_construction" musi mieć klasę / struct / union
Używam wersji boost 1_55_0 i visual studio 2013.

Odpowiedzi:

0 dla odpowiedzi № 1

Wystąpił ten sam problem, jest to znany problem z VS 2013 i Boost 1.55, sprawdź raport o błędzie tutaj. Musisz tylko uaktualnić do nowszej wersji Boost.