update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -4,8 +4,8 @@
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2014, 2018.
// Modifications copyright (c) 2014, 2018, Oracle and/or its affiliates.
// This file was modified by Oracle on 2014-2020.
// Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -20,15 +20,14 @@
#ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_DISTANCE_CONCEPT_HPP
#define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_DISTANCE_CONCEPT_HPP
#include <vector>
#include <iterator>
#include <type_traits>
#include <vector>
#include <boost/concept_check.hpp>
#include <boost/core/ignore_unused.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/geometry/util/parameter_type_of.hpp>
#include <boost/geometry/core/static_assert.hpp>
#include <boost/geometry/geometries/concepts/point_concept.hpp>
#include <boost/geometry/geometries/segment.hpp>
@@ -37,6 +36,8 @@
#include <boost/geometry/strategies/distance.hpp>
#include <boost/geometry/strategies/tags.hpp>
#include <boost/geometry/util/parameter_type_of.hpp>
namespace boost { namespace geometry { namespace concepts
{
@@ -87,14 +88,14 @@ private :
>::type tag;
static const bool is_correct_strategy_tag =
boost::is_same<tag, strategy_tag_distance_point_point>::value
|| boost::is_same<tag, strategy_tag_distance_point_box>::value
|| boost::is_same<tag, strategy_tag_distance_box_box>::value;
std::is_same<tag, strategy_tag_distance_point_point>::value
|| std::is_same<tag, strategy_tag_distance_point_box>::value
|| std::is_same<tag, strategy_tag_distance_box_box>::value;
BOOST_MPL_ASSERT_MSG
((is_correct_strategy_tag),
INCORRECT_STRATEGY_TAG,
(types<tag>));
BOOST_GEOMETRY_STATIC_ASSERT(
is_correct_strategy_tag,
"Incorrect Strategy tag.",
Strategy, tag);
// 5) must implement apply with arguments
Strategy* str = 0;
@@ -161,13 +162,13 @@ private :
// 2) must define meta-function "tag"
typedef typename services::tag<Strategy>::type tag;
BOOST_MPL_ASSERT_MSG
((boost::is_same
<
tag, strategy_tag_distance_point_segment
>::value),
INCORRECT_STRATEGY_TAG,
(types<tag>));
BOOST_GEOMETRY_STATIC_ASSERT(
(std::is_same
<
tag, strategy_tag_distance_point_segment
>::value),
"Incorrect Strategy tag.",
Strategy, tag);
// 3) must define meta-function "return_type"
typedef typename services::return_type

View File

@@ -4,6 +4,10 @@
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2020.
// Modifications copyright (c) 2020, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
@@ -14,8 +18,9 @@
#ifndef BOOST_GEOMETRY_STRATEGIES_CONCEPTS_SIMPLIFY_CONCEPT_HPP
#define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_SIMPLIFY_CONCEPT_HPP
#include <vector>
#include <iterator>
#include <type_traits>
#include <vector>
#include <boost/concept_check.hpp>
#include <boost/core/ignore_unused.hpp>
@@ -54,12 +59,12 @@ private :
ApplyMethod
>::type parameter_types;
typedef typename boost::mpl::if_
typedef std::conditional_t
<
ft::is_member_function_pointer<ApplyMethod>,
boost::mpl::int_<1>,
boost::mpl::int_<0>
>::type base_index;
ft::is_member_function_pointer<ApplyMethod>::value,
std::integral_constant<int, 1>,
std::integral_constant<int, 0>
> base_index;
BOOST_CONCEPT_ASSERT
(

View File

@@ -4,8 +4,8 @@
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2018.
// Modifications copyright (c) 2018 Oracle and/or its affiliates.
// This file was modified by Oracle on 2018-2020.
// Modifications copyright (c) 2018-2020 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
@@ -19,11 +19,13 @@
#define BOOST_GEOMETRY_STRATEGIES_CONCEPTS_WITHIN_CONCEPT_HPP
#include <type_traits>
#include <boost/concept_check.hpp>
#include <boost/core/ignore_unused.hpp>
#include <boost/function_types/result_type.hpp>
#include <boost/geometry/core/static_assert.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tag_cast.hpp>
#include <boost/geometry/core/tags.hpp>
@@ -31,6 +33,8 @@
#include <boost/geometry/geometries/concepts/box_concept.hpp>
#include <boost/geometry/geometries/concepts/point_concept.hpp>
#include <boost/geometry/strategies/detail.hpp>
#include <boost/geometry/util/parameter_type_of.hpp>
@@ -38,22 +42,72 @@ namespace boost { namespace geometry { namespace concepts
{
namespace detail
{
template
<
typename Point, typename Geometry, typename Strategy,
bool IsUmbrella = strategies::detail::is_umbrella_strategy<Strategy>::value
>
struct relate_strategy_dispatch
{
using type = decltype(std::declval<Strategy>().relate(
std::declval<Point>(), std::declval<Geometry>()));
};
template <typename Point, typename Geometry, typename Strategy>
struct relate_strategy_dispatch<Point, Geometry, Strategy, false>
{
using type = Strategy;
};
template
<
typename Point, typename Geometry, typename Strategy,
bool IsUmbrella = strategies::detail::is_umbrella_strategy<Strategy>::value
>
struct within_strategy_dispatch
{
using type = decltype(std::declval<Strategy>().within(
std::declval<Point>(), std::declval<Geometry>()));
};
template <typename Point, typename Geometry, typename Strategy>
struct within_strategy_dispatch<Point, Geometry, Strategy, false>
{
using type = Strategy;
};
} // namespace detail
/*!
\brief Checks strategy for within (point-in-polygon)
\ingroup within
*/
template <typename Strategy>
template <typename Point, typename Polygonal, typename Strategy>
class WithinStrategyPolygonal
{
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename geometry::point_type<Polygonal>::type point_of_segment;
// 0)
typedef typename concepts::detail::relate_strategy_dispatch
<
Point, Polygonal, Strategy
>::type strategy_type;
// 1) must define state_type
typedef typename Strategy::state_type state_type;
typedef typename strategy_type::state_type state_type;
struct checker
{
template <typename ApplyMethod, typename ResultMethod>
static void apply(ApplyMethod const&, ResultMethod const& )
static void apply(ApplyMethod, ResultMethod)
{
typedef typename parameter_type_of
<
@@ -76,28 +130,28 @@ class WithinStrategyPolygonal
);
// CHECK: return types (result: int, apply: bool)
BOOST_MPL_ASSERT_MSG
BOOST_GEOMETRY_STATIC_ASSERT
(
(boost::is_same
(std::is_same
<
bool, typename boost::function_types::result_type<ApplyMethod>::type
>::type::value),
WRONG_RETURN_TYPE_OF_APPLY
, (bool)
>::value),
"Wrong return type of apply().",
bool, ApplyMethod
);
BOOST_MPL_ASSERT_MSG
BOOST_GEOMETRY_STATIC_ASSERT
(
(boost::is_same
(std::is_same
<
int, typename boost::function_types::result_type<ResultMethod>::type
>::type::value),
WRONG_RETURN_TYPE_OF_RESULT
, (int)
>::value),
"Wrong return type of result().",
int, ResultMethod
);
// CHECK: calling method apply and result
Strategy const* str = 0;
strategy_type const* str = 0;
state_type* st = 0;
point_type const* p = 0;
segment_point_type const* sp = 0;
@@ -113,7 +167,8 @@ class WithinStrategyPolygonal
public :
BOOST_CONCEPT_USAGE(WithinStrategyPolygonal)
{
checker::apply(&Strategy::apply, &Strategy::result);
checker::apply(&strategy_type::template apply<Point, point_of_segment>,
&strategy_type::result);
}
#endif
};
@@ -123,10 +178,16 @@ class WithinStrategyPointBox
{
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
// 0)
typedef typename concepts::detail::within_strategy_dispatch
<
Point, Box, Strategy
>::type strategy_type;
struct checker
{
template <typename ApplyMethod>
static void apply(ApplyMethod const&)
static void apply(ApplyMethod)
{
typedef typename parameter_type_of
<
@@ -149,20 +210,20 @@ class WithinStrategyPointBox
);
// CHECK: return types (apply: bool)
BOOST_MPL_ASSERT_MSG
BOOST_GEOMETRY_STATIC_ASSERT
(
(boost::is_same
(std::is_same
<
bool,
typename boost::function_types::result_type<ApplyMethod>::type
>::type::value),
WRONG_RETURN_TYPE
, (bool)
>::value),
"Wrong return type of apply().",
bool, ApplyMethod
);
// CHECK: calling method apply
Strategy const* str = 0;
strategy_type const* str = 0;
point_type const* p = 0;
box_type const* bx = 0;
@@ -176,16 +237,22 @@ class WithinStrategyPointBox
public :
BOOST_CONCEPT_USAGE(WithinStrategyPointBox)
{
checker::apply(&Strategy::template apply<Point, Box>);
checker::apply(&strategy_type::template apply<Point, Box>);
}
#endif
};
template <typename Strategy>
template <typename Box1, typename Box2, typename Strategy>
class WithinStrategyBoxBox
{
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
// 0)
typedef typename concepts::detail::within_strategy_dispatch
<
Box1, Box2, Strategy
>::type strategy_type;
struct checker
{
template <typename ApplyMethod>
@@ -212,20 +279,20 @@ class WithinStrategyBoxBox
);
// CHECK: return types (apply: bool)
BOOST_MPL_ASSERT_MSG
BOOST_GEOMETRY_STATIC_ASSERT
(
(boost::is_same
(std::is_same
<
bool,
typename boost::function_types::result_type<ApplyMethod>::type
>::type::value),
WRONG_RETURN_TYPE
, (bool)
>::value),
"Wrong return type of apply().",
bool, ApplyMethod
);
// CHECK: calling method apply
Strategy const* str = 0;
strategy_type const* str = 0;
box_type1 const* b1 = 0;
box_type2 const* b2 = 0;
@@ -239,7 +306,7 @@ class WithinStrategyBoxBox
public :
BOOST_CONCEPT_USAGE(WithinStrategyBoxBox)
{
checker::apply(&Strategy::apply);
checker::apply(&strategy_type::template apply<Box1, Box2>);
}
#endif
};
@@ -270,7 +337,7 @@ template
>
struct check_within<Geometry1, Geometry2, point_tag, AnyTag, areal_tag, Strategy>
{
BOOST_CONCEPT_ASSERT( (WithinStrategyPolygonal<Strategy>) );
BOOST_CONCEPT_ASSERT( (WithinStrategyPolygonal<Geometry1, Geometry2, Strategy>) );
};
@@ -283,7 +350,7 @@ struct check_within<Geometry1, Geometry2, point_tag, box_tag, areal_tag, Strateg
template <typename Geometry1, typename Geometry2, typename Strategy>
struct check_within<Geometry1, Geometry2, box_tag, box_tag, areal_tag, Strategy>
{
BOOST_CONCEPT_ASSERT( (WithinStrategyBoxBox<Strategy>) );
BOOST_CONCEPT_ASSERT( (WithinStrategyBoxBox<Geometry1, Geometry2, Strategy>) );
};