update boost on linux
This commit is contained in:
@@ -150,8 +150,11 @@ namespace boost { namespace polygon{
|
||||
// return o;
|
||||
// }
|
||||
|
||||
class lessScan45ElementRise : public std::binary_function<Scan45Element, Scan45Element, bool> {
|
||||
class lessScan45ElementRise {
|
||||
public:
|
||||
typedef Scan45Element first_argument_type;
|
||||
typedef Scan45Element second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline lessScan45ElementRise() {} //default constructor is only constructor
|
||||
inline bool operator () (Scan45Element elm1, Scan45Element elm2) const {
|
||||
return elm1.rise < elm2.rise;
|
||||
@@ -457,8 +460,11 @@ namespace boost { namespace polygon{
|
||||
return Scan45Element(vertex.first.x(), vertex.first.y(), index - 1, vertex.second[index]);
|
||||
}
|
||||
|
||||
class lessScan45Point : public std::binary_function<Point, Point, bool> {
|
||||
class lessScan45Point {
|
||||
public:
|
||||
typedef Point first_argument_type;
|
||||
typedef Point second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline lessScan45Point() {} //default constructor is only constructor
|
||||
inline bool operator () (const Point& v1, const Point& v2) const {
|
||||
return (v1.x() < v2.x()) || (v1.x() == v2.x() && v1.y() < v2.y());
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
itrb = begin_points(polygon);
|
||||
itre = end_points(polygon);
|
||||
use_wrap = false;
|
||||
if(itrb == itre || dir == HIGH || size(polygon) < 4) {
|
||||
if(itrb == itre || dir == HIGH || ::boost::polygon::size(polygon) < 4) {
|
||||
polygon_index = -1;
|
||||
} else {
|
||||
direction_1d wdir = w;
|
||||
|
||||
@@ -36,8 +36,11 @@ namespace boost { namespace polygon{
|
||||
|
||||
typedef std::pair<std::pair<Unit, Interval>, Node* > EdgeAssociation;
|
||||
|
||||
class lessEdgeAssociation : public std::binary_function<const EdgeAssociation&, const EdgeAssociation&, bool> {
|
||||
class lessEdgeAssociation {
|
||||
public:
|
||||
typedef const EdgeAssociation& first_argument_type;
|
||||
typedef const EdgeAssociation& second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline lessEdgeAssociation() {}
|
||||
inline bool operator () (const EdgeAssociation& elem1, const EdgeAssociation& elem2) const {
|
||||
if(elem1.first.first < elem2.first.first) return true;
|
||||
|
||||
@@ -22,8 +22,11 @@ namespace boost { namespace polygon{
|
||||
typedef point_data<Unit> Point;
|
||||
typedef std::pair<Point, Point> half_edge;
|
||||
|
||||
class less_point : public std::binary_function<Point, Point, bool> {
|
||||
class less_point {
|
||||
public:
|
||||
typedef Point first_argument_type;
|
||||
typedef Point second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline less_point() {}
|
||||
inline bool operator () (const Point& pt1, const Point& pt2) const {
|
||||
if(pt1.get(HORIZONTAL) < pt2.get(HORIZONTAL)) return true;
|
||||
@@ -264,12 +267,15 @@ namespace boost { namespace polygon{
|
||||
}
|
||||
|
||||
//scanline comparator functor
|
||||
class less_half_edge : public std::binary_function<half_edge, half_edge, bool> {
|
||||
class less_half_edge {
|
||||
private:
|
||||
Unit *x_; //x value at which to apply comparison
|
||||
int *justBefore_;
|
||||
evalAtXforYPack * pack_;
|
||||
public:
|
||||
typedef half_edge first_argument_type;
|
||||
typedef half_edge second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline less_half_edge() : x_(0), justBefore_(0), pack_(0) {}
|
||||
inline less_half_edge(Unit *x, int *justBefore, evalAtXforYPack * packIn) : x_(x), justBefore_(justBefore), pack_(packIn) {}
|
||||
inline less_half_edge(const less_half_edge& that) : x_(that.x_), justBefore_(that.justBefore_),
|
||||
@@ -761,11 +767,14 @@ namespace boost { namespace polygon{
|
||||
};
|
||||
|
||||
//when scanning Vertex45 for polygon formation we need a scanline comparator functor
|
||||
class less_vertex_half_edge : public std::binary_function<vertex_half_edge, vertex_half_edge, bool> {
|
||||
class less_vertex_half_edge {
|
||||
private:
|
||||
Unit *x_; //x value at which to apply comparison
|
||||
int *justBefore_;
|
||||
public:
|
||||
typedef vertex_half_edge first_argument_type;
|
||||
typedef vertex_half_edge second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline less_vertex_half_edge() : x_(0), justBefore_(0) {}
|
||||
inline less_vertex_half_edge(Unit *x, int *justBefore) : x_(x), justBefore_(justBefore) {}
|
||||
inline less_vertex_half_edge(const less_vertex_half_edge& that) : x_(that.x_), justBefore_(that.justBefore_) {}
|
||||
@@ -1195,10 +1204,13 @@ namespace boost { namespace polygon{
|
||||
|
||||
typedef std::vector<std::pair<Point, int> > vertex_arbitrary_count;
|
||||
|
||||
class less_half_edge_count : public std::binary_function<vertex_half_edge, vertex_half_edge, bool> {
|
||||
class less_half_edge_count {
|
||||
private:
|
||||
Point pt_;
|
||||
public:
|
||||
typedef vertex_half_edge first_argument_type;
|
||||
typedef vertex_half_edge second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline less_half_edge_count() : pt_() {}
|
||||
inline less_half_edge_count(Point point) : pt_(point) {}
|
||||
inline bool operator () (const std::pair<Point, int>& elm1, const std::pair<Point, int>& elm2) const {
|
||||
@@ -1213,11 +1225,13 @@ namespace boost { namespace polygon{
|
||||
|
||||
typedef std::vector<std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*> > incoming_count;
|
||||
|
||||
class less_incoming_count : public std::binary_function<std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>,
|
||||
std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>, bool> {
|
||||
class less_incoming_count {
|
||||
private:
|
||||
Point pt_;
|
||||
public:
|
||||
typedef std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*> first_argument_type;
|
||||
typedef std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*> second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline less_incoming_count() : pt_() {}
|
||||
inline less_incoming_count(Point point) : pt_(point) {}
|
||||
inline bool operator () (const std::pair<std::pair<std::pair<Point, Point>, int>, active_tail_arbitrary*>& elm1,
|
||||
|
||||
@@ -316,8 +316,11 @@ namespace boost { namespace polygon{
|
||||
return true;
|
||||
}
|
||||
|
||||
class less_point_down_slope : public std::binary_function<Point, Point, bool> {
|
||||
class less_point_down_slope {
|
||||
public:
|
||||
typedef Point first_argument_type;
|
||||
typedef Point second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline less_point_down_slope() {}
|
||||
inline bool operator () (const Point& pt1, const Point& pt2) const {
|
||||
if(pt1.get(HORIZONTAL) < pt2.get(HORIZONTAL)) return true;
|
||||
|
||||
@@ -40,12 +40,6 @@ typedef boost::ulong_long_type polygon_ulong_long_type;
|
||||
//typedef long long polygon_long_long_type;
|
||||
//typedef unsigned long long polygon_ulong_long_type;
|
||||
#endif
|
||||
#include <boost/mpl/size_t.hpp>
|
||||
#include <boost/mpl/protect.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#else
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -57,54 +51,6 @@ typedef boost::ulong_long_type polygon_ulong_long_type;
|
||||
#define BOOST_POLYGON_USE_LONG_LONG
|
||||
typedef long long polygon_long_long_type;
|
||||
typedef unsigned long long polygon_ulong_long_type;
|
||||
|
||||
namespace boost {
|
||||
template <bool B, class T = void>
|
||||
struct enable_if_c {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct enable_if_c<false, T> {};
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct enable_if : public enable_if_c<Cond::value, T> {};
|
||||
|
||||
template <bool B, class T>
|
||||
struct lazy_enable_if_c {
|
||||
typedef typename T::type type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct lazy_enable_if_c<false, T> {};
|
||||
|
||||
template <class Cond, class T>
|
||||
struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
|
||||
|
||||
|
||||
template <bool B, class T = void>
|
||||
struct disable_if_c {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct disable_if_c<true, T> {};
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct disable_if : public disable_if_c<Cond::value, T> {};
|
||||
|
||||
template <bool B, class T>
|
||||
struct lazy_disable_if_c {
|
||||
typedef typename T::type type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct lazy_disable_if_c<true, T> {};
|
||||
|
||||
template <class Cond, class T>
|
||||
struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
namespace boost { namespace polygon{
|
||||
@@ -266,22 +212,6 @@ namespace boost { namespace polygon{
|
||||
template <>
|
||||
struct geometry_concept<long double> { typedef coordinate_concept type; };
|
||||
|
||||
#ifndef BOOST_POLYGON_NO_DEPS
|
||||
struct gtl_no : mpl::bool_<false> {};
|
||||
struct gtl_yes : mpl::bool_<true> {};
|
||||
template <typename T, typename T2>
|
||||
struct gtl_and : mpl::and_<T, T2> {};
|
||||
template <typename T, typename T2, typename T3>
|
||||
struct gtl_and_3 : mpl::and_<T, T2, T3> {};
|
||||
template <typename T, typename T2, typename T3, typename T4>
|
||||
struct gtl_and_4 : mpl::and_<T, T2, T3, T4> {};
|
||||
// template <typename T, typename T2>
|
||||
// struct gtl_or : mpl::or_<T, T2> {};
|
||||
// template <typename T, typename T2, typename T3>
|
||||
// struct gtl_or_3 : mpl::or_<T, T2, T3> {};
|
||||
// template <typename T, typename T2, typename T3, typename T4>
|
||||
// struct gtl_or_4 : mpl::or_<T, T2, T3, T4> {};
|
||||
#else
|
||||
struct gtl_no { static const bool value = false; };
|
||||
struct gtl_yes { typedef gtl_yes type;
|
||||
static const bool value = true; };
|
||||
@@ -300,7 +230,6 @@ namespace boost { namespace polygon{
|
||||
template <typename T, typename T2, typename T3, typename T4>
|
||||
struct gtl_and_4 { typedef typename gtl_and_3<
|
||||
T, T2, typename gtl_and<T3, T4>::type>::type type; };
|
||||
#endif
|
||||
template <typename T, typename T2>
|
||||
struct gtl_or { typedef gtl_yes type; };
|
||||
template <typename T>
|
||||
@@ -348,6 +277,18 @@ namespace boost { namespace polygon{
|
||||
struct area_type_by_domain<manhattan_domain, coordinate_type> {
|
||||
typedef typename coordinate_traits<coordinate_type>::manhattan_area_type type; };
|
||||
|
||||
template<bool E, class R = void>
|
||||
struct enable_if_ {
|
||||
typedef R type;
|
||||
};
|
||||
|
||||
template<class R>
|
||||
struct enable_if_<false, R> { };
|
||||
|
||||
template<class E, class R = void>
|
||||
struct enable_if
|
||||
: enable_if_<E::value, R> { };
|
||||
|
||||
struct y_c_edist : gtl_yes {};
|
||||
|
||||
template <typename coordinate_type_1, typename coordinate_type_2>
|
||||
|
||||
@@ -583,7 +583,7 @@ namespace boost { namespace polygon{
|
||||
polygon_type>::type &
|
||||
convolve(polygon_type& polygon, const point_type& point) {
|
||||
std::vector<typename polygon_90_traits<polygon_type>::coordinate_type> coords;
|
||||
coords.reserve(size(polygon));
|
||||
coords.reserve(::boost::polygon::size(polygon));
|
||||
bool pingpong = true;
|
||||
for(typename polygon_90_traits<polygon_type>::compact_iterator_type iter = begin_compact(polygon);
|
||||
iter != end_compact(polygon); ++iter) {
|
||||
@@ -603,7 +603,7 @@ namespace boost { namespace polygon{
|
||||
polygon_type>::type &
|
||||
convolve(polygon_type& polygon, const point_type& point) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -655,7 +655,7 @@ namespace boost { namespace polygon{
|
||||
typename enable_if< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type, polygon_type>::type &
|
||||
transform(polygon_type& polygon, const transform_type& tr) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -689,7 +689,7 @@ namespace boost { namespace polygon{
|
||||
typename enable_if< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type, polygon_type>::type &
|
||||
scale_up(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -728,7 +728,7 @@ namespace boost { namespace polygon{
|
||||
polygon_type>::type &
|
||||
scale_down(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -824,7 +824,7 @@ namespace boost { namespace polygon{
|
||||
typename enable_if< typename is_any_mutable_polygon_without_holes_type<polygon_type>::type, polygon_type>::type &
|
||||
snap_to_45(polygon_type& polygon) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -863,7 +863,7 @@ namespace boost { namespace polygon{
|
||||
polygon_type>::type &
|
||||
scale_down(polygon_type& polygon, typename coordinate_traits<typename polygon_traits<polygon_type>::coordinate_type>::unsigned_area_type factor) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -903,7 +903,7 @@ namespace boost { namespace polygon{
|
||||
polygon_type>::type &
|
||||
scale(polygon_type& polygon, double factor) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -924,7 +924,7 @@ namespace boost { namespace polygon{
|
||||
typename geometry_domain<typename geometry_concept<polygon_type>::type>::type>::type>::type>::type * = 0
|
||||
) {
|
||||
std::vector<typename std::iterator_traits<typename polygon_traits<polygon_type>::iterator_type>::value_type> points;
|
||||
points.reserve(size(polygon));
|
||||
points.reserve(::boost::polygon::size(polygon));
|
||||
for(typename polygon_traits<polygon_type>::iterator_type iter = begin_points(polygon);
|
||||
iter != end_points(polygon); ++iter) {
|
||||
points.push_back(*iter);
|
||||
@@ -1183,8 +1183,11 @@ namespace boost { namespace polygon{
|
||||
typedef point_data<Unit> Point;
|
||||
typedef std::pair<Point, Point> half_edge;
|
||||
|
||||
class less_point : public std::binary_function<Point, Point, bool> {
|
||||
class less_point {
|
||||
public:
|
||||
typedef Point first_argument_type;
|
||||
typedef Point second_argument_type;
|
||||
typedef bool result_type;
|
||||
inline less_point() {}
|
||||
inline bool operator () (const Point& pt1, const Point& pt2) const {
|
||||
if(pt1.get(HORIZONTAL) < pt2.get(HORIZONTAL)) return true;
|
||||
|
||||
Reference in New Issue
Block a user