#include #include #include namespace gtl = boost::polygon; using namespace boost::polygon::operators; int main() { //lets construct a 10x10 rectangle shaped polygon typedef gtl::polygon_90_data Polygon; typedef gtl::polygon_traits_90::point_type Point; Point pts[] = { gtl::construct(0, 0), gtl::construct(10, 0), gtl::construct(10, 10), gtl::construct(0, 10)}; Polygon poly; gtl::set_points(poly, pts, pts+4); Point point = gtl::construct(15, 5); { // Wrong result here : bool result = gtl::contains(poly, point); std::cout << std::boolalpha << result << std::endl; } //assert(!gtl::contains(poly, point)); //assert(!gtl::contains(poly, gtl::construct(15, 5))); return 0; }