Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ constant boost_dependencies :
/boost/throw_exception//boost_throw_exception
/boost/tokenizer//boost_tokenizer
/boost/tuple//boost_tuple
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If #1458 is merged before this, this will be resolved.

/boost/type_traits//boost_type_traits
/boost/variant//boost_variant
/boost/variant2//boost_variant2 ;

Expand Down
3 changes: 2 additions & 1 deletion doc/design_rationale.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ The distance function is calling that `pythagoras` structure, specifying the num
template <typename P1, typename P2>
double distance(P1 const& a, P2 const& b)
{
BOOST_STATIC_ASSERT(( dimension<P1>::value == dimension<P2>::value ));
static_assert(dimension<P1>::value == dimension<P2>::value,
"Distance can only be computed for points of same dimension.");

return sqrt(pythagoras<P1, P2, dimension<P1>::value>::apply(a, b));
}
Expand Down
1 change: 0 additions & 1 deletion doc/doxy/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = BOOST_CONCEPT_REQUIRES(x) \
BOOST_CONCEPT_ASSERT(x) \
BOOST_STATIC_ASSERT(x) \
DOXYGEN_SHOULD_SKIP_THIS \
DOXYGEN_NO_DISPATCH \
DOXYGEN_NO_IMPL \
Expand Down
6 changes: 3 additions & 3 deletions doc/src/docutils/tools/support_status/support_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <type_traits>

#include <boost/mpl/for_each.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/type_traits/is_base_of.hpp>

#define BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD true

Expand Down Expand Up @@ -112,7 +112,7 @@ struct do_unary_test

void operator()()
{
if (boost::is_base_of<boost::geometry::nyi::not_implemented_tag, Dispatcher<G> >::type::value)
if (std::is_base_of<boost::geometry::nyi::not_implemented_tag, Dispatcher<G> >::type::value)
{
m_outputter.nyi();
}
Expand All @@ -134,7 +134,7 @@ struct do_binary_test
template <typename G1>
void operator()(G1)
{
if (boost::is_base_of<boost::geometry::nyi::not_implemented_tag, Dispatcher<G1, G2> >::type::value)
if (std::is_base_of<boost::geometry::nyi::not_implemented_tag, Dispatcher<G1, G2> >::type::value)
{
m_outputter.nyi();
}
Expand Down
3 changes: 2 additions & 1 deletion doc/src/examples/core/ring_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <iostream>
#include <typeinfo>
#include <type_traits>

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/polygon.hpp>
Expand All @@ -36,7 +37,7 @@ int main()

std::cout
<< std::boolalpha
<< boost::is_same<ring_type, int_ring_type>::value
<< std::is_same<ring_type, int_ring_type>::value
<< std::endl;

return 0;
Expand Down
3 changes: 2 additions & 1 deletion doc/src/examples/core/rings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Also shows the related ring_type and interior_type.
*/

#include <iostream>
#include <type_traits>

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/polygon.hpp>
Expand Down Expand Up @@ -59,7 +60,7 @@ int main()

std::cout
<< std::boolalpha
<< boost::is_same<ring_type, int_ring_type>::value
<< std::is_same<ring_type, int_ring_type>::value
<< std::endl;

return 0;
Expand Down
5 changes: 2 additions & 3 deletions example/c04_a_custom_triangle_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
//
// Custom Triangle Example

#include <array>
#include <iostream>

#include <boost/array.hpp>

#include <boost/geometry/algorithms/area.hpp>
#include <boost/geometry/algorithms/centroid.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
Expand All @@ -22,7 +21,7 @@
#include <boost/geometry/io/dsv/write.hpp>


struct triangle : public boost::array<boost::geometry::model::d2::point_xy<double>, 4>
struct triangle : public std::array<boost::geometry::model::d2::point_xy<double>, 4>
{
inline void close()
{
Expand Down
4 changes: 2 additions & 2 deletions example/c04_b_custom_triangle_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
//
// Custom triangle template Example

#include <array>
#include <iostream>

#include <boost/array.hpp>
#include <boost/tuple/tuple.hpp>

#include <boost/geometry/algorithms/area.hpp>
Expand All @@ -26,7 +26,7 @@ BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)


template <typename P>
struct triangle : public boost::array<P, 3>
struct triangle : public std::array<P, 3>
{
};

Expand Down
11 changes: 6 additions & 5 deletions example/c06_custom_polygon_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
// Custom Polygon Example
#include <array>
#include <iostream>

#include <boost/geometry/geometry.hpp>
Expand Down Expand Up @@ -38,7 +39,7 @@ struct my_polygon
// required for a polygon: an outer ring...
my_ring boundary;
// ... and a Boost.Range compatible inner ring collection
boost::array<my_ring, 2> holes;
std::array<my_ring, 2> holes;

// just for the sample
std::string name;
Expand All @@ -54,7 +55,7 @@ BOOST_GEOMETRY_REGISTER_RING(my_ring)


// There is currently no registration macro for polygons
// and besides that a boost::array<T,N> in a macro would
// and besides that a std::array<T,N> in a macro would
// be very specific, so we show it "by hand":
namespace boost { namespace geometry { namespace traits
{
Expand All @@ -65,12 +66,12 @@ template<> struct ring_mutable_type<my_polygon> { typedef my_ring& type; };

template<> struct interior_const_type<my_polygon>
{
typedef boost::array<my_ring, 2> const& type;
typedef std::array<my_ring, 2> const& type;
};

template<> struct interior_mutable_type<my_polygon>
{
typedef boost::array<my_ring, 2>& type;
typedef std::array<my_ring, 2>& type;
};

template<> struct exterior_ring<my_polygon>
Expand All @@ -88,7 +89,7 @@ template<> struct exterior_ring<my_polygon>

template<> struct interior_rings<my_polygon>
{
typedef boost::array<my_ring, 2> holes_type;
typedef std::array<my_ring, 2> holes_type;

static holes_type& get(my_polygon& p)
{
Expand Down
5 changes: 3 additions & 2 deletions example/c08_custom_non_std_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// Custom polygon example

#include <iostream>
#include <type_traits>

#include <boost/assert.hpp>

Expand Down Expand Up @@ -74,7 +75,7 @@ struct custom_iterator : public boost::iterator_facade
boost::random_access_traversal_tag,
typename boost::mpl::if_
<
boost::is_const<MyPolygon>,
std::is_const<MyPolygon>,
my_point const,
my_point
>::type&
Expand All @@ -101,7 +102,7 @@ struct custom_iterator : public boost::iterator_facade

typedef typename boost::mpl::if_
<
boost::is_const<MyPolygon>,
std::is_const<MyPolygon>,
my_point const,
my_point
>::type my_point_type;
Expand Down
5 changes: 2 additions & 3 deletions extensions/example/experimental/geometry_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
#include <vector>
#include <string>
#include <iostream>

#include <type_traits>


#include <boost/proto/core.hpp>
#include <boost/proto/transform.hpp>
#include <boost/type_traits/add_reference.hpp>

#include <boost/mpl/assert.hpp>

Expand All @@ -40,7 +39,7 @@ struct append_point : proto::callable

template<typename This, typename Geometry, typename T1, typename T2>
struct result<This(Geometry, T1, T2)>
: boost::add_reference<Geometry>
: std::add_lvalue_reference<Geometry>
{};

template<typename Geometry, typename T1, typename T2>
Expand Down
5 changes: 3 additions & 2 deletions extensions/test/algorithms/distance_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <string>
#include <type_traits>

#include <geometry_test_common.hpp>

Expand Down Expand Up @@ -61,8 +62,8 @@ void test_distance_info(Geometry1 const& geometry1, Geometry2 const& geometry2,

// Check reversed version too.
std::string reversed_expected_pp = expected_pp;
if (boost::is_same<typename bg::tag<Geometry1>::type, bg::point_tag>::value
&& boost::is_same<typename bg::tag<Geometry2>::type, bg::point_tag>::value
if (std::is_same<typename bg::tag<Geometry1>::type, bg::point_tag>::value
&& std::is_same<typename bg::tag<Geometry2>::type, bg::point_tag>::value
)
{
// For point-point, we cannot check projected-point again, it is also the other one.
Expand Down
4 changes: 2 additions & 2 deletions extensions/test/gis/io/wkb/read_wkb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <cstdint>
#include <iterator>
#include <string>
#include <vector>

#include <boost/test/included/test_exec_monitor.hpp>
#include <boost/test/included/unit_test.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <boost/cstdint.hpp>
#include <boost/geometry/strategies/strategies.hpp>

#include <boost/geometry/algorithms/equals.hpp>
Expand All @@ -37,7 +37,7 @@ namespace bg = boost::geometry;

namespace { // anonymous

typedef std::vector<boost::uint8_t> byte_vector;
typedef std::vector<std::uint8_t> byte_vector;

template <typename Geometry>
void test_geometry_wrong_wkb(std::string const& wkbhex, std::string const& wkt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@


#include <array>
#include <memory>

#include <boost/core/addressof.hpp>
#include <boost/range/size.hpp>

#include <boost/geometry/core/assert.hpp>
Expand Down Expand Up @@ -202,7 +202,7 @@ struct piece_border
BOOST_GEOMETRY_ASSERT(begin < boost::size(ring));
BOOST_GEOMETRY_ASSERT(end <= boost::size(ring));

m_ring = boost::addressof(ring);
m_ring = std::addressof(ring);
m_begin = begin;
m_end = end;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@


#include <cstddef>
#include <memory>

#include <boost/core/addressof.hpp>
#include <boost/core/ref.hpp>

#include <boost/geometry/core/cs.hpp>
Expand Down Expand Up @@ -82,12 +82,12 @@ struct translating_transformer<Geometry, areal_tag, cartesian_tag>
pt_it = geometry::points_begin(geom);
if ( pt_it != geometry::points_end(geom) )
{
m_origin = boost::addressof(*pt_it);
m_origin = std::addressof(*pt_it);
}
}

explicit translating_transformer(point_type const& origin)
: m_origin(boost::addressof(origin))
: m_origin(std::addressof(origin))
{}

result_type apply(point_type const& pt) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

#include <algorithm>
#include <iterator>

#include <boost/core/addressof.hpp>
#include <memory>

#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/detail/closest_points/utilities.hpp>
Expand Down Expand Up @@ -97,7 +96,7 @@ class segment_to_segment
d[2] = cds.apply(p[0], cp2);
d[3] = cds.apply(p[1], cp3);

std::size_t imin = std::distance(boost::addressof(d[0]), std::min_element(d, d + 4));
std::size_t imin = std::distance(std::addressof(d[0]), std::min_element(d, d + 4));

switch (imin)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

#include <algorithm>
#include <iterator>

#include <boost/core/addressof.hpp>
#include <memory>

#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/detail/distance/is_comparable.hpp>
Expand Down Expand Up @@ -80,7 +79,7 @@ class segment_to_segment
d[2] = cstrategy.apply(p[0], q[0], q[1]);
d[3] = cstrategy.apply(p[1], q[0], q[1]);

std::size_t imin = std::distance(boost::addressof(d[0]),
std::size_t imin = std::distance(std::addressof(d[0]),
std::min_element(d, d + 4));

if BOOST_GEOMETRY_CONSTEXPR (is_comparable<strategy_type>::value)
Expand Down
4 changes: 2 additions & 2 deletions include/boost/geometry/algorithms/detail/for_each_range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_FOR_EACH_RANGE_HPP


#include <memory>
#include <type_traits>
#include <utility>

#include <boost/concept/requires.hpp>
#include <boost/core/addressof.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

Expand Down Expand Up @@ -52,7 +52,7 @@ struct fe_range_point
template <typename Functor>
static inline bool apply(Point& point, Functor&& f)
{
Point* ptr = boost::addressof(point);
Point* ptr = std::addressof(point);
return f(std::pair<Point*, Point*>(ptr, ptr + 1));
}
};
Expand Down
Loading
Loading