#include #include #include #include namespace bp = boost::polygon; typedef int32_t Coord; typedef bp::polygon_set_data PSet; typedef bp::rectangle_data Rect; int main() { using namespace bp::operators; PSet ps1; ps1.insert(Rect(0, 0, 1, 1)); Coord low = std::numeric_limits::min(); Coord high = std::numeric_limits::max(); // fails //Coord high = std::numeric_limits::max()-100; // also fails //Coord high = std::numeric_limits::max()/2; // works PSet ps2 = ps1 & Rect(low, low, high, high); assert(ps1 == ps2); }