#include <cassert>
#include <iostream>

#include <boost/polygon/polygon.hpp>

using namespace boost::polygon::operators;

int main() {
    //lets construct a 10x10 rectangle shaped polygon
    typedef boost::polygon::polygon_data<float> Polygon;
    typedef boost::polygon::polygon_traits<Polygon>::point_type Point;
    Point pts[] = {
        boost::polygon::construct<Point>(0, 0),
        boost::polygon::construct<Point>(1, 0),
        boost::polygon::construct<Point>(1, 1),
        boost::polygon::construct<Point>(0, 1) };

    Polygon poly;
    boost::polygon::set_points(poly, pts, pts+4);

    std::cout << "Area: " << boost::polygon::area(poly) << std::endl;

    poly += 1; // no match for += operator

    std::cout << "Area: " << boost::polygon::area(poly) << std::endl;

    return 0;
}
