mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 21:44:04 +00:00
Merge pull request #1152 from vissarion/fix/cxx11_macros
Remove CXX11/14 related macros
This commit is contained in:
commit
c479ca194e
1
.github/workflows/minimal.yml
vendored
1
.github/workflows/minimal.yml
vendored
@ -64,6 +64,7 @@ jobs:
|
||||
b2_cxxstd: 14,17,2a
|
||||
version: "10"
|
||||
|
||||
|
||||
steps:
|
||||
- name: Set up environment
|
||||
id: setenv
|
||||
|
@ -165,10 +165,8 @@ may use `index::satisfies()` function like on the example below:
|
||||
rt.query(index::intersects(box) && index::satisfies(is_red_o()),
|
||||
std::back_inserter(result));
|
||||
|
||||
#ifndef BOOST_NO_CXX11_LAMBDAS
|
||||
rt.query(index::intersects(box) && index::satisfies([](__value__ const& v) { return v.is_red(); }),
|
||||
std::back_inserter(result));
|
||||
#endif
|
||||
|
||||
`satisfies()` may be negated, e.g.:
|
||||
|
||||
@ -239,7 +237,7 @@ The most basic way is creating a temporary container for Values and insert them
|
||||
|
||||
However there are other ways. One of these methods is mentioned in the "Creation and modification" section.
|
||||
The insert iterator may be passed directly into the query.
|
||||
|
||||
|
||||
RTree rt3;
|
||||
rt1.query(bgi::intersects(Box(/*...*/))), bgi::inserter(rt3));
|
||||
|
||||
|
@ -8,14 +8,6 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX11_HDR_ARRAY
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else //this example needs C++11 std::array
|
||||
|
||||
//[std_array
|
||||
//` Shows how to use a C++11 std::array using Boost.Geometry's distance, set and assign_values algorithms
|
||||
@ -49,8 +41,6 @@ int main()
|
||||
|
||||
//]
|
||||
|
||||
#endif //BOOST_NO_CXX11_HDR_ARRAY
|
||||
|
||||
//[std_array_output
|
||||
/*`
|
||||
Output:
|
||||
|
@ -23,13 +23,8 @@ int main()
|
||||
|
||||
box_t box1; /*< Default-construct a box. >*/
|
||||
box_t box2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning min and max corner point. >*/
|
||||
|
||||
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
|
||||
box_t box3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
bg::set<bg::min_corner, 0>(box1, 1.0); /*< Set a coordinate, generic. >*/
|
||||
bg::set<bg::min_corner, 1>(box1, 2.0);
|
||||
box1.max_corner().set<0>(3.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set()`). >*/
|
||||
|
@ -23,14 +23,8 @@ int main()
|
||||
typedef bg::model::linestring<point_t> linestring_t;
|
||||
|
||||
linestring_t ls1; /*< Default-construct a linestring. >*/
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
|
||||
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
linestring_t ls2{{0.0, 0.0}, {1.0, 0.0}, {1.0, 2.0}}; /*< Construct a linestring containing three points, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
bg::append(ls1, point_t(0.0, 0.0)); /*< Append point. >*/
|
||||
bg::append(ls1, point_t(1.0, 0.0));
|
||||
bg::append(ls1, point_t(1.0, 2.0));
|
||||
|
@ -24,15 +24,9 @@ int main()
|
||||
typedef bg::model::multi_linestring<linestring_t> mlinestring_t;
|
||||
|
||||
mlinestring_t mls1; /*< Default-construct a multi_linestring. >*/
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
|
||||
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
mlinestring_t mls2{{{0.0, 0.0}, {0.0, 1.0}, {2.0, 1.0}},
|
||||
{{1.0, 0.0}, {2.0, 0.0}}}; /*< Construct a multi_linestring containing two linestrings, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
mls1.resize(2); /*< Resize a multi_linestring, store two linestrings. >*/
|
||||
|
||||
bg::append(mls1[0], point_t(0.0, 0.0)); /*< Append point to the first linestring. >*/
|
||||
|
@ -23,14 +23,8 @@ int main()
|
||||
typedef bg::model::multi_point<point_t> mpoint_t;
|
||||
|
||||
mpoint_t mpt1; /*< Default-construct a multi_point. >*/
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
|
||||
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
mpoint_t mpt2{{{0.0, 0.0}, {1.0, 1.0}, {2.0, 2.0}}}; /*< Construct a multi_point containing three points, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
bg::append(mpt1, point_t(0.0, 0.0)); /*< Append point to the multi_point. >*/
|
||||
bg::append(mpt1, point_t(1.0, 1.0));
|
||||
bg::append(mpt1, point_t(2.0, 2.0));
|
||||
|
@ -24,16 +24,10 @@ int main()
|
||||
typedef bg::model::multi_polygon<polygon_t> mpolygon_t; /*< Clockwise, closed multi_polygon. >*/
|
||||
|
||||
mpolygon_t mpoly1; /*< Default-construct a multi_polygon. >*/
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
|
||||
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
mpolygon_t mpoly2{{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}},
|
||||
{{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}},
|
||||
{{{5.0, 5.0}, {5.0, 6.0}, {6.0, 6.0}, {6.0, 5.0}, {5.0, 5.0}}}}; /*< Construct a multi_polygon containing two polygons, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
mpoly1.resize(2); /*< Resize a multi_polygon, store two polygons. >*/
|
||||
|
||||
bg::append(mpoly1[0].outer(), point_t(0.0, 0.0)); /*< Append point to the exterior ring of the first polygon. >*/
|
||||
|
@ -24,14 +24,9 @@ int main()
|
||||
|
||||
polygon_t poly1; /*< Default-construct a polygon. >*/
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
|
||||
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
polygon_t polygon2{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}},
|
||||
{{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}}; /*< Construct a polygon containing an exterior and interior ring, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
bg::append(poly1.outer(), point_t(0.0, 0.0)); /*< Append point to the exterior ring. >*/
|
||||
bg::append(poly1.outer(), point_t(0.0, 5.0));
|
||||
bg::append(poly1.outer(), point_t(5.0, 5.0));
|
||||
|
@ -23,14 +23,8 @@ int main()
|
||||
typedef bg::model::ring<point_t> ring_t; /*< Default parameters, clockwise, closed ring. >*/
|
||||
|
||||
ring_t ring1; /*< Default-construct a ring. >*/
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
|
||||
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
|
||||
ring_t ring2{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}; /*< Construct a ring containing four points plus one closing point, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
bg::append(ring1, point_t(0.0, 0.0)); /*< Append point. >*/
|
||||
bg::append(ring1, point_t(0.0, 5.0));
|
||||
bg::append(ring1, point_t(5.0, 5.0));
|
||||
|
@ -24,13 +24,8 @@ int main()
|
||||
|
||||
segment_t seg1; /*< Default-construct a segment. >*/
|
||||
segment_t seg2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning the first and the second point. >*/
|
||||
|
||||
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
|
||||
segment_t seg3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/
|
||||
|
||||
#endif
|
||||
|
||||
bg::set<0, 0>(seg1, 1.0); /*< Set a coordinate. >*/
|
||||
bg::set<0, 1>(seg1, 2.0);
|
||||
bg::set<1, 0>(seg1, 3.0);
|
||||
|
@ -34,13 +34,4 @@
|
||||
#error "Define either BOOST_GEOMETRY_NO_ROBUSTNESS (default) or BOOST_GEOMETRY_USE_RESCALING"
|
||||
#endif
|
||||
|
||||
// NOTE: workaround for VC++ 12 (aka 2013): cannot specify explicit initializer for arrays
|
||||
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && (!defined(_MSC_VER) || (_MSC_VER >= 1900))
|
||||
#define BOOST_GEOMETRY_CXX11_ARRAY_UNIFIED_INITIALIZATION
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
#define BOOST_GEOMETRY_CXX11_TUPLE
|
||||
#endif
|
||||
|
||||
#endif // BOOST_GEOMETRY_CORE_CONFIG_HPP
|
||||
|
@ -18,10 +18,6 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_ARRAY
|
||||
|
||||
|
||||
#define BOOST_GEOMETRY_ADAPTED_STD_ARRAY_TAG_DEFINED
|
||||
|
||||
|
||||
@ -121,15 +117,5 @@ struct access<std::array<CoordinateType, DimensionCount>, Dimension>
|
||||
}; \
|
||||
}}}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
#warning "This file requires compiler and library support for the ISO C++ 2011 standard."
|
||||
|
||||
|
||||
#endif // BOOST_NO_CXX11_HDR_ARRAY
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_GEOMETRIES_ADAPTED_STD_ARRAY_HPP
|
||||
|
||||
|
@ -29,9 +29,7 @@
|
||||
|
||||
#include <boost/geometry/geometries/concepts/point_concept.hpp>
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -77,8 +75,6 @@ public :
|
||||
: base_type(begin, end)
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
/// \constructor_initializer_list{linestring}
|
||||
inline linestring(std::initializer_list<Point> l)
|
||||
: base_type(l.begin(), l.end())
|
||||
@ -96,8 +92,6 @@ public :
|
||||
// return *this;
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
@ -24,9 +24,8 @@
|
||||
#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -57,8 +56,6 @@ class multi_linestring : public Container<LineString, Allocator<LineString> >
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT( (concepts::Linestring<LineString>) );
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
// default constructor and base_type definitions are required only
|
||||
// if the constructor taking std::initializer_list is defined
|
||||
|
||||
@ -87,8 +84,6 @@ public:
|
||||
// return *this;
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -24,9 +24,8 @@
|
||||
#include <boost/geometry/geometries/concepts/point_concept.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -74,8 +73,6 @@ public :
|
||||
: base_type(begin, end)
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
/// \constructor_initializer_list{multi_point}
|
||||
inline multi_point(std::initializer_list<Point> l)
|
||||
: base_type(l.begin(), l.end())
|
||||
@ -94,7 +91,6 @@ public :
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
@ -24,9 +24,9 @@
|
||||
#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -56,8 +56,6 @@ class multi_polygon : public Container<Polygon, Allocator<Polygon> >
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT( (concepts::Polygon<Polygon>) );
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
// default constructor and base_type definitions are required only
|
||||
// if the constructor taking std::initializer_list is defined
|
||||
|
||||
@ -86,8 +84,6 @@ public:
|
||||
// return *this;
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -28,9 +28,9 @@
|
||||
#include <boost/geometry/geometries/ring.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -90,8 +90,6 @@ public:
|
||||
inline ring_type& outer() { return m_outer; }
|
||||
inline inner_container_type & inners() { return m_inners; }
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
// default constructor definition is required only
|
||||
// if the constructor taking std::initializer_list is defined
|
||||
|
||||
@ -129,8 +127,6 @@ public:
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
|
||||
/// Utility method, clears outer and inner rings
|
||||
inline void clear()
|
||||
{
|
||||
|
@ -28,9 +28,8 @@
|
||||
#include <boost/geometry/geometries/concepts/point_concept.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
@ -79,8 +78,6 @@ public :
|
||||
: base_type(begin, end)
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
/// \constructor_initializer_list{ring}
|
||||
inline ring(std::initializer_list<Point> l)
|
||||
: base_type(l.begin(), l.end())
|
||||
@ -99,7 +96,6 @@ public :
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include <boost/geometry/algorithms/detail/equals/interface.hpp>
|
||||
#include <boost/geometry/index/indexable.hpp>
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace boost { namespace geometry { namespace index { namespace detail
|
||||
{
|
||||
|
||||
@ -231,10 +233,6 @@ struct equal_to<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>, false>
|
||||
|
||||
}}}} // namespace boost::geometry::index::detail
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace boost { namespace geometry { namespace index { namespace detail {
|
||||
|
||||
template <typename Tuple, size_t I, size_t N>
|
||||
@ -293,7 +291,6 @@ struct equal_to<std::tuple<Args...>, false>
|
||||
|
||||
}}}} // namespace boost::geometry::index::detail
|
||||
|
||||
#endif // !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
namespace boost { namespace geometry { namespace index {
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace boost { namespace geometry { namespace index { namespace detail
|
||||
{
|
||||
|
||||
@ -251,10 +253,6 @@ struct indexable<boost::tuples::cons<Indexable, Tail>, false>
|
||||
|
||||
}}}} // namespace boost::geometry::index::detail
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace boost { namespace geometry { namespace index { namespace detail {
|
||||
|
||||
/*!
|
||||
@ -317,7 +315,6 @@ struct indexable<std::tuple<Indexable, Args...>, false>
|
||||
|
||||
}}}} // namespace boost::geometry::index::detail
|
||||
|
||||
#endif // !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
namespace boost { namespace geometry { namespace index {
|
||||
|
||||
|
@ -300,10 +300,8 @@ std::back_inserter(result));
|
||||
rt.query(index::intersects(box) && index::satisfies(is_red_o()),
|
||||
std::back_inserter(result));
|
||||
|
||||
#ifndef BOOST_NO_CXX11_LAMBDAS
|
||||
rt.query(index::intersects(box) && index::satisfies([](Value const& v) { return v.is_red(); }),
|
||||
std::back_inserter(result));
|
||||
#endif
|
||||
\endverbatim
|
||||
|
||||
\ingroup predicates
|
||||
|
@ -588,12 +588,10 @@ struct parameter
|
||||
, m_value(srs::detail::nadgrids(boost::begin(v), boost::end(v)))
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
parameter(name_nadgrids id, std::initializer_list<std::string> v)
|
||||
: m_id(id)
|
||||
, m_value(srs::detail::nadgrids(v))
|
||||
{}
|
||||
#endif
|
||||
|
||||
parameter(name_orient id, value_orient v)
|
||||
: m_id(id), m_value(int(v))
|
||||
@ -653,7 +651,6 @@ struct parameter
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
parameter(name_towgs84 id, std::initializer_list<T> v)
|
||||
: m_id(id)
|
||||
, m_value(srs::detail::towgs84<T>(v))
|
||||
@ -664,7 +661,6 @@ struct parameter
|
||||
BOOST_THROW_EXCEPTION( projection_exception("Invalid number of towgs84 elements. Should be 3 or 7.") );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
parameter(name_axis id, std::initializer_list<int> v)
|
||||
: m_id(id)
|
||||
@ -743,66 +739,6 @@ public:
|
||||
|
||||
BOOST_DEFAULTED_FUNCTION(parameters(), {})
|
||||
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template <typename Id>
|
||||
explicit parameters(Id id)
|
||||
{
|
||||
add(id);
|
||||
}
|
||||
|
||||
template <typename Id>
|
||||
parameters & add(Id id)
|
||||
{
|
||||
m_params.push_back(parameter<T>(id));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id>
|
||||
parameters & operator()(Id id)
|
||||
{
|
||||
return add(id);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters(Id id, V const& value)
|
||||
{
|
||||
add(id, value);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & add(Id id, V const& value)
|
||||
{
|
||||
m_params.push_back(parameter<T>(id, value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & operator()(Id id, V const& value)
|
||||
{
|
||||
return add(id, value);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
template <typename Id, typename V>
|
||||
parameters(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
add(id, value);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & add(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
m_params.push_back(parameter<T>(id, value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & operator()(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
return add(id, value);
|
||||
}
|
||||
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#else // BOOST_NO_CXX11_RVALUE_REFERENCES || BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <typename Id>
|
||||
explicit parameters(Id id)
|
||||
{
|
||||
@ -841,7 +777,6 @@ public:
|
||||
return add(id, std::forward<V>(value));
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
template <typename Id, typename V>
|
||||
parameters(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
@ -860,8 +795,6 @@ public:
|
||||
{
|
||||
return add(id, value);
|
||||
}
|
||||
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES || BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
const_iterator begin() const { return m_params.begin(); }
|
||||
const_iterator end() const { return m_params.end(); }
|
||||
|
@ -125,16 +125,10 @@ struct dms_parser
|
||||
bool has_dms[3];
|
||||
|
||||
dms_value()
|
||||
#ifdef BOOST_GEOMETRY_CXX11_ARRAY_UNIFIED_INITIALIZATION
|
||||
: dms{0, 0, 0}
|
||||
, has_dms{false, false, false}
|
||||
{}
|
||||
#else
|
||||
{
|
||||
std::fill(dms, dms + 3, T(0));
|
||||
std::fill(has_dms, has_dms + 3, false);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -36,11 +36,9 @@ struct nadgrids
|
||||
: base_t(first, last)
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
nadgrids(std::initializer_list<std::string> l)
|
||||
: base_t(l)
|
||||
{}
|
||||
#endif
|
||||
|
||||
nadgrids(std::string const& g0)
|
||||
: base_t(1)
|
||||
@ -88,14 +86,9 @@ struct towgs84
|
||||
|
||||
towgs84()
|
||||
: m_size(0)
|
||||
#ifdef BOOST_GEOMETRY_CXX11_ARRAY_UNIFIED_INITIALIZATION
|
||||
, m_data{0, 0, 0, 0, 0, 0, 0}
|
||||
{}
|
||||
#else
|
||||
{
|
||||
std::fill(m_data, m_data + 7, T(0));
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename It>
|
||||
towgs84(It first, It last)
|
||||
@ -103,12 +96,10 @@ struct towgs84
|
||||
assign(first, last);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
towgs84(std::initializer_list<T> l)
|
||||
{
|
||||
assign(l.begin(), l.end());
|
||||
}
|
||||
#endif
|
||||
|
||||
towgs84(T const& v0, T const& v1, T const& v2)
|
||||
: m_size(3)
|
||||
@ -144,12 +135,10 @@ struct towgs84
|
||||
m_data[m_size] = *first;
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
void assign(std::initializer_list<T> l)
|
||||
{
|
||||
assign(l.begin(), l.end());
|
||||
}
|
||||
#endif
|
||||
|
||||
const_reference operator[](size_type i) const
|
||||
{
|
||||
|
@ -465,9 +465,7 @@ struct nadgrids
|
||||
nadgrids(std::string const& g0, std::string const& g1, std::string const& g2) : base_t(g0, g1, g2) {}
|
||||
nadgrids(std::string const& g0, std::string const& g1, std::string const& g2, std::string const& g3) : base_t(g0, g1, g2, g3) {}
|
||||
nadgrids(std::string const& g0, std::string const& g1, std::string const& g2, std::string const& g3, std::string const& g4) : base_t(g0, g1, g2, g3, g4) {}
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
nadgrids(std::initializer_list<std::string> l) : base_t(l) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename Proj>
|
||||
@ -488,9 +486,7 @@ struct towgs84
|
||||
towgs84(T const& v0, T const& v1, T const& v2, T const& v3, T const& v4, T const& v5, T const& v6)
|
||||
: base_t(v0, v1, v2, v3, v4, v5, v6)
|
||||
{}
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
towgs84(std::initializer_list<T> l) : base_t(l) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
struct axis
|
||||
|
@ -74,11 +74,6 @@ struct str_cast_traits_strtox<T, false, false>
|
||||
}
|
||||
};
|
||||
|
||||
// Assuming a compiler supporting r-value references
|
||||
// supports long long and strtoll, strtoull, strtof, strtold
|
||||
// If it's MSVC enable in MSVC++ 12.0 aka Visual Studio 2013
|
||||
// TODO: in MSVC-11.0 _strtoi64() intrinsic could be used
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined(_MSC_VER) || (_MSC_VER >= 1800))
|
||||
template <>
|
||||
struct str_cast_traits_strtox<long long, true, true>
|
||||
{
|
||||
@ -114,7 +109,6 @@ struct str_cast_traits_strtox<long double, false, false>
|
||||
return strtold(str, str_end);
|
||||
}
|
||||
};
|
||||
#endif // C++11 strtox supported
|
||||
|
||||
template <typename T>
|
||||
struct str_cast_traits_generic
|
||||
|
@ -96,13 +96,12 @@ struct variant_internal_node<Value, Parameters, Box, Allocators, node_throwing_s
|
||||
{
|
||||
throwing_nodes_stats::get_internal_nodes_counter_ref()++;
|
||||
}
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
inline variant_internal_node(variant_internal_node && n)
|
||||
: elements(boost::move(n.elements))
|
||||
{
|
||||
throwing_nodes_stats::get_internal_nodes_counter_ref()++;
|
||||
}
|
||||
#endif
|
||||
|
||||
elements_type elements;
|
||||
|
||||
@ -126,13 +125,12 @@ struct variant_leaf<Value, Parameters, Box, Allocators, node_throwing_static_tag
|
||||
{
|
||||
throwing_nodes_stats::get_leafs_counter_ref()++;
|
||||
}
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
inline variant_leaf(variant_leaf && n)
|
||||
: elements(boost::move(n.elements))
|
||||
{
|
||||
throwing_nodes_stats::get_leafs_counter_ref()++;
|
||||
}
|
||||
#endif
|
||||
|
||||
elements_type elements;
|
||||
|
||||
@ -229,13 +227,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
inline allocators & operator=(allocators const& a)
|
||||
{
|
||||
node_allocator() = a.node_allocator();
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
void swap(allocators & a)
|
||||
{
|
||||
|
@ -243,8 +243,6 @@ struct value< boost::tuple<bg::model::box< bg::model::point<T, 3, C> >, int, int
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename T, typename C>
|
||||
struct value< std::tuple<bg::model::point<T, 2, C>, int, int> >
|
||||
{
|
||||
@ -303,8 +301,6 @@ struct value< std::tuple<bg::model::box< bg::model::point<T, 3, C> >, int, int>
|
||||
}
|
||||
};
|
||||
|
||||
#endif // #if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
} // namespace generate
|
||||
|
||||
// shared_ptr value
|
||||
@ -1357,14 +1353,12 @@ void satisfies(Rtree const& rtree, std::vector<Value> const& input)
|
||||
rtree.query(!bgi::satisfies(satisfies_fun<Value>), std::back_inserter(result));
|
||||
BOOST_CHECK(result.size() == 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_LAMBDAS
|
||||
result.clear();
|
||||
rtree.query(bgi::satisfies([](Value const&){ return true; }), std::back_inserter(result));
|
||||
BOOST_CHECK(result.size() == input.size());
|
||||
result.clear();
|
||||
rtree.query(!bgi::satisfies([](Value const&){ return true; }), std::back_inserter(result));
|
||||
BOOST_CHECK(result.size() == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
// rtree copying and moving
|
||||
@ -1973,10 +1967,8 @@ void test_rtree_for_point(Parameters const& parameters, Allocator const& allocat
|
||||
|
||||
test_rtree_additional<Point>(parameters, allocator);
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
typedef std::tuple<Point, int, int> StdTupleP;
|
||||
test_rtree_by_value<StdTupleP, Parameters>(parameters, allocator);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename Point, typename Parameters, typename Allocator>
|
||||
@ -1995,10 +1987,8 @@ void test_rtree_for_box(Parameters const& parameters, Allocator const& allocator
|
||||
|
||||
test_rtree_additional<Box>(parameters, allocator);
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
typedef std::tuple<Box, int, int> StdTupleB;
|
||||
test_rtree_by_value<StdTupleB, Parameters>(parameters, allocator);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename Point, typename Parameters>
|
||||
@ -2030,10 +2020,8 @@ void modifiers(Parameters const& parameters, Allocator const& allocator)
|
||||
test_rtree_modifiers<SharedPtr>(parameters, allocator);
|
||||
test_rtree_modifiers<VNoDCtor>(parameters, allocator);
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
typedef std::tuple<Indexable, int, int> StdTuple;
|
||||
test_rtree_modifiers<StdTuple>(parameters, allocator);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename Indexable, typename Parameters, typename Allocator>
|
||||
@ -2051,10 +2039,8 @@ void queries(Parameters const& parameters, Allocator const& allocator)
|
||||
test_rtree_queries<SharedPtr>(parameters, allocator);
|
||||
test_rtree_queries<VNoDCtor>(parameters, allocator);
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
typedef std::tuple<Indexable, int, int> StdTuple;
|
||||
test_rtree_queries<StdTuple>(parameters, allocator);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename Indexable, typename Parameters, typename Allocator>
|
||||
|
@ -75,7 +75,7 @@ int test_main(int, char* [])
|
||||
BOOST_CHECK_EQUAL((bg::range::detail::is_range<int>::value), false);
|
||||
BOOST_CHECK_EQUAL((bg::range::detail::is_range<linestring>::value), true);
|
||||
BOOST_CHECK_EQUAL((bg::range::detail::is_range<multi_point>::value), true);
|
||||
|
||||
|
||||
BOOST_CHECK_EQUAL((bgd::is_tupled_output_element<int>::value), false);
|
||||
BOOST_CHECK_EQUAL((bgd::is_tupled_output_element<linestring>::value), false);
|
||||
BOOST_CHECK_EQUAL((bgd::is_tupled_output_element<multi_point>::value), true);
|
||||
@ -98,8 +98,6 @@ int test_main(int, char* [])
|
||||
std::pair<bgr::back_insert_iterator<multi_linestring>,
|
||||
bgr::back_insert_iterator<multi_point> > >();
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
|
||||
test_all<std::tuple<polygon, linestring>, std::tuple<linestring, multi_point> >();
|
||||
|
||||
test_range_values<std::tuple<multi_linestring, multi_point>,
|
||||
@ -109,7 +107,5 @@ int test_main(int, char* [])
|
||||
std::tuple<bgr::back_insert_iterator<multi_linestring>,
|
||||
bgr::back_insert_iterator<multi_point> > >();
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -34,12 +34,8 @@ typedef bg::model::multi_point<Pt> MPt;
|
||||
typedef bg::model::multi_linestring<Ls> MLs;
|
||||
typedef bg::model::multi_polygon<Po> MPo;
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#endif
|
||||
|
||||
template <typename G>
|
||||
inline void check(std::string const& wkt1,
|
||||
std::string const& wkt2,
|
||||
@ -85,8 +81,6 @@ inline void check(std::string const& wkt1,
|
||||
check(wkt1, wkt2, pair.second, out_l_str);
|
||||
}
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
inline void check(std::string const& wkt1,
|
||||
std::string const& wkt2,
|
||||
std::tuple<MPt, MLs, MPo> const& tup,
|
||||
@ -99,8 +93,6 @@ inline void check(std::string const& wkt1,
|
||||
check(wkt1, wkt2, std::get<2>(tup), out_a_str);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template <typename In1, typename In2, typename Tup>
|
||||
inline void test_one(std::string const& in1_str,
|
||||
std::string const& in2_str,
|
||||
@ -361,10 +353,7 @@ int test_main(int, char* [])
|
||||
{
|
||||
test_pair<std::pair<MPt, MLs> >();
|
||||
test_tuple<boost::tuple<MPt, MLs, MPo> >();
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
test_tuple<std::tuple<MPt, MLs, MPo> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -34,12 +34,8 @@ typedef bg::model::multi_point<Pt> MPt;
|
||||
typedef bg::model::multi_linestring<Ls> MLs;
|
||||
typedef bg::model::multi_polygon<Po> MPo;
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#endif
|
||||
|
||||
template <typename G>
|
||||
inline void check(std::string const& wkt1,
|
||||
std::string const& wkt2,
|
||||
@ -85,8 +81,6 @@ inline void check(std::string const& wkt1,
|
||||
check(wkt1, wkt2, pair.second, out_l_str);
|
||||
}
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
inline void check(std::string const& wkt1,
|
||||
std::string const& wkt2,
|
||||
std::tuple<MPt, MLs, MPo> const& tup,
|
||||
@ -99,8 +93,6 @@ inline void check(std::string const& wkt1,
|
||||
check(wkt1, wkt2, std::get<2>(tup), out_a_str);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template <typename In1, typename In2, typename Tup>
|
||||
inline void test_one(std::string const& in1_str,
|
||||
std::string const& in2_str,
|
||||
@ -379,10 +371,7 @@ int test_main(int, char* [])
|
||||
{
|
||||
test_pair<std::pair<MPt, MLs> >();
|
||||
test_tuple<boost::tuple<MPt, MLs, MPo> >();
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
test_tuple<std::tuple<MPt, MLs, MPo> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -34,12 +34,8 @@ typedef bg::model::multi_point<Pt> MPt;
|
||||
typedef bg::model::multi_linestring<Ls> MLs;
|
||||
typedef bg::model::multi_polygon<Po> MPo;
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#endif
|
||||
|
||||
template <typename G>
|
||||
inline void check(std::string const& wkt1,
|
||||
std::string const& wkt2,
|
||||
@ -85,8 +81,6 @@ inline void check(std::string const& wkt1,
|
||||
check(wkt1, wkt2, pair.second, out_l_str);
|
||||
}
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
|
||||
inline void check(std::string const& wkt1,
|
||||
std::string const& wkt2,
|
||||
std::tuple<MPt, MLs, MPo> const& tup,
|
||||
@ -99,8 +93,6 @@ inline void check(std::string const& wkt1,
|
||||
check(wkt1, wkt2, std::get<2>(tup), out_a_str);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template <typename In1, typename In2, typename Tup>
|
||||
inline void test_one(std::string const& in1_str,
|
||||
std::string const& in2_str,
|
||||
@ -384,10 +376,7 @@ int test_main(int, char* [])
|
||||
{
|
||||
test_pair<std::pair<MPt, MLs> >();
|
||||
test_tuple<boost::tuple<MPt, MLs, MPo> >();
|
||||
|
||||
#ifdef BOOST_GEOMETRY_CXX11_TUPLE
|
||||
test_tuple<std::tuple<MPt, MLs, MPo> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -97,8 +97,6 @@ void test_per_point_const(Geometry const& geometry, int expected)
|
||||
|
||||
|
||||
// Lambda
|
||||
#if !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
|
||||
typename bg::coordinate_type<point_type>::type sum_x = 0;
|
||||
|
||||
bg::for_each_point
|
||||
@ -112,7 +110,6 @@ void test_per_point_const(Geometry const& geometry, int expected)
|
||||
);
|
||||
|
||||
BOOST_CHECK_EQUAL(sum_x, expected);
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename Geometry>
|
||||
@ -120,9 +117,7 @@ void test_per_point_non_const(Geometry& geometry,
|
||||
std::string const& expected1,
|
||||
std::string const& expected2)
|
||||
{
|
||||
#if !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
Geometry copy = geometry;
|
||||
#endif
|
||||
|
||||
typedef typename bg::point_type<Geometry>::type point_type;
|
||||
|
||||
@ -147,7 +142,6 @@ void test_per_point_non_const(Geometry& geometry,
|
||||
<< " expected " << expected2
|
||||
<< " got " << bg::wkt(geometry));
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_LAMBDAS)
|
||||
// Lambda, both functions above together. Without / with capturing
|
||||
|
||||
geometry = copy;
|
||||
@ -179,8 +173,6 @@ void test_per_point_non_const(Geometry& geometry,
|
||||
"for_each_point (lambda): "
|
||||
<< " expected " << expected2
|
||||
<< " got " << bg::wkt(geometry));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -117,8 +117,6 @@ void test_boost_assign_tuple_2d()
|
||||
template <typename P>
|
||||
void test_initializer_list_2d()
|
||||
{
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
|
||||
|
||||
typedef bg::model::multi_point<P> mpt;
|
||||
typedef bg::model::linestring<P> ls;
|
||||
typedef bg::model::multi_linestring<ls> mls;
|
||||
@ -186,8 +184,6 @@ void test_initializer_list_2d()
|
||||
// multi_polygon::operator=(initializer_list<Polygon>)
|
||||
mp1 = {{{{0, 0}, {0, 1}, {1, 2}, {2, 1}, {1, 0}, {0, 0}}}, {{{2, 2}, {2, 3}, {3, 3}, {3, 2}, {2, 2}}}};
|
||||
BOOST_CHECK(bg::num_points(mp1) == 11);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
@ -210,10 +206,8 @@ struct test_range
|
||||
test_range() {}
|
||||
template <typename It>
|
||||
test_range(It, It) {}
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
||||
test_range(std::initializer_list<T>) {}
|
||||
//test_range & operator=(std::initializer_list<T>) { return *this; }
|
||||
#endif
|
||||
};
|
||||
|
||||
void test_sanity_check()
|
||||
@ -222,7 +216,6 @@ void test_sanity_check()
|
||||
typedef test_range<P> R;
|
||||
typedef std::vector<P> V;
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
|
||||
{
|
||||
R r = {{1, 1},{2, 2},{3, 3}};
|
||||
r = {{1, 1},{2, 2},{3, 3}};
|
||||
@ -230,7 +223,7 @@ void test_sanity_check()
|
||||
V v = {{1, 1},{2, 2},{3, 3}};
|
||||
v = {{1, 1},{2, 2},{3, 3}};
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
R r = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
|
||||
r = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
|
||||
|
@ -27,14 +27,11 @@
|
||||
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#include <initializer_list>
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
|
||||
template <typename P>
|
||||
bg::model::linestring<P> create_linestring()
|
||||
{
|
||||
{
|
||||
bg::model::linestring<P> l1;
|
||||
P p1;
|
||||
bg::assign_values(p1, 1, 2, 3);
|
||||
@ -74,7 +71,7 @@ void test_copy_assignment()
|
||||
|
||||
template <typename P>
|
||||
void test_concept()
|
||||
{
|
||||
{
|
||||
typedef bg::model::linestring<P> L;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<L>) );
|
||||
@ -87,7 +84,7 @@ void test_concept()
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
{
|
||||
{
|
||||
test_default_constructor<P>();
|
||||
test_copy_constructor<P>();
|
||||
test_copy_assignment<P>();
|
||||
@ -105,11 +102,9 @@ void test_custom_linestring(std::initializer_list<P> IL)
|
||||
|
||||
template <typename P>
|
||||
void test_custom()
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
{
|
||||
std::initializer_list<P> IL = {P(1, 2), P(2, 3), P(3, 4)};
|
||||
test_custom_linestring<P>(IL);
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
}
|
||||
|
||||
template <typename CS>
|
||||
@ -124,7 +119,7 @@ void test_cs()
|
||||
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
{
|
||||
test_cs<bg::cs::cartesian>();
|
||||
test_cs<bg::cs::spherical<bg::degree> >();
|
||||
test_cs<bg::cs::spherical_equatorial<bg::degree> >();
|
||||
|
@ -28,13 +28,11 @@
|
||||
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#include <initializer_list>
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
template <typename P>
|
||||
bg::model::linestring<P> create_linestring()
|
||||
{
|
||||
{
|
||||
bg::model::linestring<P> l1;
|
||||
P p1(1, 2);
|
||||
bg::append(l1, p1);
|
||||
@ -43,7 +41,7 @@ bg::model::linestring<P> create_linestring()
|
||||
|
||||
template <typename P, typename L>
|
||||
bg::model::multi_linestring<L> create_multi_linestring()
|
||||
{
|
||||
{
|
||||
bg::model::multi_linestring<L> ml1;
|
||||
L l1(create_linestring<P>());
|
||||
ml1.push_back(l1);
|
||||
@ -53,7 +51,7 @@ bg::model::multi_linestring<L> create_multi_linestring()
|
||||
|
||||
template <typename ML, typename L>
|
||||
void check_multi_linestring(ML& to_check, L l1)
|
||||
{
|
||||
{
|
||||
ML cur;
|
||||
cur.push_back(l1);
|
||||
cur.push_back(l1);
|
||||
@ -88,7 +86,7 @@ void test_copy_assignment()
|
||||
|
||||
template <typename L>
|
||||
void test_concept()
|
||||
{
|
||||
{
|
||||
typedef bg::model::multi_linestring<L> ML;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiLinestring<ML>) );
|
||||
@ -101,7 +99,7 @@ void test_concept()
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
{
|
||||
{
|
||||
typedef bg::model::linestring<P> L;
|
||||
|
||||
test_default_constructor<P, L>();
|
||||
@ -112,9 +110,9 @@ void test_all()
|
||||
|
||||
template <typename P>
|
||||
void test_custom_multi_linestring(bg::model::linestring<P> IL)
|
||||
{
|
||||
{
|
||||
typedef bg::model::linestring<P> L;
|
||||
|
||||
|
||||
std::initializer_list<L> LIL = {IL};
|
||||
bg::model::multi_linestring<L> ml1(LIL);
|
||||
std::ostringstream out;
|
||||
@ -124,15 +122,13 @@ void test_custom_multi_linestring(bg::model::linestring<P> IL)
|
||||
|
||||
template <typename P>
|
||||
void test_custom()
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
{
|
||||
std::initializer_list<P> IL1 = {P(1, 1), P(2, 2), P(3, 3)};
|
||||
std::initializer_list<P> IL2 = {P(0, 0), P(0, 2), P(0, 3)};
|
||||
bg::model::linestring<P> l1;
|
||||
bg::append(l1, IL1);
|
||||
bg::append(l1, IL2);
|
||||
test_custom_multi_linestring<P>(l1);
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
}
|
||||
|
||||
template <typename CS>
|
||||
@ -147,7 +143,7 @@ void test_cs()
|
||||
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
{
|
||||
test_cs<bg::cs::cartesian>();
|
||||
test_cs<bg::cs::spherical<bg::degree> >();
|
||||
test_cs<bg::cs::spherical_equatorial<bg::degree> >();
|
||||
|
@ -27,13 +27,11 @@
|
||||
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#include <initializer_list>
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
template <typename P>
|
||||
bg::model::multi_point<P> create_multi_point()
|
||||
{
|
||||
{
|
||||
bg::model::multi_point<P> mp1;
|
||||
P p1;
|
||||
bg::assign_values(p1, 1, 2, 3);
|
||||
@ -73,7 +71,7 @@ void test_copy_assignment()
|
||||
|
||||
template <typename P>
|
||||
void test_concept()
|
||||
{
|
||||
{
|
||||
typedef bg::model::multi_point<P> MP;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiPoint<MP>) );
|
||||
@ -86,7 +84,7 @@ void test_concept()
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
{
|
||||
{
|
||||
test_default_constructor<P>();
|
||||
test_copy_constructor<P>();
|
||||
test_copy_assignment<P>();
|
||||
@ -104,11 +102,9 @@ void test_custom_multi_point(std::initializer_list<P> IL)
|
||||
|
||||
template <typename P>
|
||||
void test_custom()
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
{
|
||||
std::initializer_list<P> IL = {P(0, 0), P(1, 2), P(2, 0)};
|
||||
test_custom_multi_point<P>(IL);
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
}
|
||||
|
||||
template <typename CS>
|
||||
@ -123,7 +119,7 @@ void test_cs()
|
||||
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
{
|
||||
test_cs<bg::cs::cartesian>();
|
||||
test_cs<bg::cs::spherical<bg::degree> >();
|
||||
test_cs<bg::cs::spherical_equatorial<bg::degree> >();
|
||||
|
@ -28,13 +28,11 @@
|
||||
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#include <initializer_list>
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
template <typename P>
|
||||
bg::model::polygon<P> create_polygon()
|
||||
{
|
||||
{
|
||||
bg::model::polygon<P> pl1;
|
||||
P p1;
|
||||
P p2;
|
||||
@ -42,7 +40,7 @@ bg::model::polygon<P> create_polygon()
|
||||
bg::assign_values(p1, 1, 2);
|
||||
bg::assign_values(p2, 2, 0);
|
||||
bg::assign_values(p3, 0, 0);
|
||||
|
||||
|
||||
bg::append(pl1, p1);
|
||||
bg::append(pl1, p2);
|
||||
bg::append(pl1, p3);
|
||||
@ -62,7 +60,7 @@ bg::model::multi_polygon<PL> create_multi_polygon()
|
||||
|
||||
template <typename MPL, typename PL>
|
||||
void check_multi_polygon(MPL& to_check, PL pl1)
|
||||
{
|
||||
{
|
||||
MPL cur;
|
||||
cur.push_back(pl1);
|
||||
cur.push_back(pl1);
|
||||
@ -97,7 +95,7 @@ void test_copy_assignment()
|
||||
|
||||
template <typename PL>
|
||||
void test_concept()
|
||||
{
|
||||
{
|
||||
typedef bg::model::multi_polygon<PL> MPL;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiPolygon<MPL>) );
|
||||
@ -110,7 +108,7 @@ void test_concept()
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
{
|
||||
{
|
||||
typedef bg::model::polygon<P> PL;
|
||||
|
||||
test_default_constructor<P, PL>();
|
||||
@ -121,7 +119,7 @@ void test_all()
|
||||
|
||||
template <typename P>
|
||||
void test_custom_multi_polygon(bg::model::polygon<P> IL)
|
||||
{
|
||||
{
|
||||
typedef bg::model::polygon<P> PL;
|
||||
|
||||
std::initializer_list<PL> PIL = {IL};
|
||||
@ -133,13 +131,11 @@ void test_custom_multi_polygon(bg::model::polygon<P> IL)
|
||||
|
||||
template <typename P>
|
||||
void test_custom()
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
{
|
||||
std::initializer_list<P> IL = {P(3, 3), P(3, 0), P(0, 0), P(0, 3), P(3, 3)};
|
||||
bg::model::ring<P> r1(IL);
|
||||
std::initializer_list<bg::model::ring<P> > RIL = {r1};
|
||||
test_custom_multi_polygon<P>(RIL);
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
}
|
||||
|
||||
template <typename CS>
|
||||
@ -154,7 +150,7 @@ void test_cs()
|
||||
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
{
|
||||
test_cs<bg::cs::cartesian>();
|
||||
test_cs<bg::cs::spherical<bg::degree> >();
|
||||
test_cs<bg::cs::spherical_equatorial<bg::degree> >();
|
||||
|
@ -27,13 +27,11 @@
|
||||
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#include <initializer_list>
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
template <typename P>
|
||||
bg::model::ring<P> create_ring()
|
||||
{
|
||||
{
|
||||
bg::model::ring<P> r1;
|
||||
P p1;
|
||||
P p2;
|
||||
@ -43,7 +41,7 @@ bg::model::ring<P> create_ring()
|
||||
bg::assign_values(p2, 2, 0);
|
||||
bg::assign_values(p3, 0, 0);
|
||||
bg::assign_values(p4, 0, 2);
|
||||
|
||||
|
||||
bg::append(r1, p1);
|
||||
bg::append(r1, p2);
|
||||
bg::append(r1, p3);
|
||||
@ -61,7 +59,7 @@ void check_point(P& to_check, T x, T y)
|
||||
|
||||
template <typename R, typename P>
|
||||
void check_ring(R& to_check, P p1, P p2, P p3, P p4)
|
||||
{
|
||||
{
|
||||
check_point(to_check[0], bg::get<0>(p1), bg::get<1>(p1));
|
||||
check_point(to_check[1], bg::get<0>(p2), bg::get<1>(p2));
|
||||
check_point(to_check[2], bg::get<0>(p3), bg::get<1>(p3));
|
||||
@ -93,7 +91,7 @@ void test_copy_assignment()
|
||||
|
||||
template <typename P>
|
||||
void test_concept()
|
||||
{
|
||||
{
|
||||
typedef bg::model::ring<P> R;
|
||||
|
||||
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstRing<R>) );
|
||||
@ -106,7 +104,7 @@ void test_concept()
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
{
|
||||
{
|
||||
test_default_constructor<P>();
|
||||
test_copy_constructor<P>();
|
||||
test_copy_assignment<P>();
|
||||
@ -115,7 +113,7 @@ void test_all()
|
||||
|
||||
template <typename P>
|
||||
void test_custom_ring(bg::model::ring<P> IL)
|
||||
{
|
||||
{
|
||||
bg::model::ring<P> r1(IL);
|
||||
std::ostringstream out;
|
||||
out << bg::dsv(r1);
|
||||
@ -124,11 +122,9 @@ void test_custom_ring(bg::model::ring<P> IL)
|
||||
|
||||
template <typename P>
|
||||
void test_custom()
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
{
|
||||
std::initializer_list<P> IL = {P(3, 3), P(3, 0), P(0, 0), P(0, 3), P(3, 3)};
|
||||
test_custom_ring<P>(IL);
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
}
|
||||
|
||||
template <typename CS>
|
||||
@ -143,7 +139,7 @@ void test_cs()
|
||||
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
{
|
||||
test_cs<bg::cs::cartesian>();
|
||||
test_cs<bg::cs::spherical<bg::degree> >();
|
||||
test_cs<bg::cs::spherical_equatorial<bg::degree> >();
|
||||
|
@ -38,7 +38,6 @@ struct pj_ptr
|
||||
: m_ptr(ptr)
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
pj_ptr(pj_ptr && other)
|
||||
: m_ptr(other.m_ptr)
|
||||
{
|
||||
@ -53,7 +52,6 @@ struct pj_ptr
|
||||
other.m_ptr = NULL;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
projPJ get() const
|
||||
{
|
||||
@ -84,7 +82,7 @@ struct pj_projection
|
||||
{
|
||||
double x = boost::geometry::get_as_radian<0>(in);
|
||||
double y = boost::geometry::get_as_radian<1>(in);
|
||||
|
||||
|
||||
projUV p1;
|
||||
projUV p2;
|
||||
|
||||
@ -102,7 +100,7 @@ struct pj_projection
|
||||
{
|
||||
double lon = boost::geometry::get_as_radian<0>(in);
|
||||
double lat = boost::geometry::get_as_radian<1>(in);
|
||||
|
||||
|
||||
projUV p1;
|
||||
projUV p2;
|
||||
|
||||
@ -193,7 +191,6 @@ struct proj5_ptr
|
||||
: m_ptr(ptr)
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
proj5_ptr(proj5_ptr && other)
|
||||
: m_ptr(other.m_ptr)
|
||||
{
|
||||
@ -208,7 +205,6 @@ struct proj5_ptr
|
||||
other.m_ptr = NULL;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
PJ *get() const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user