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

@@ -5,8 +5,8 @@
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
// Copyright (c) 2014-2015 Samuel Debionne, Grenoble, France.
// This file was modified by Oracle on 2015, 2016, 2018.
// Modifications copyright (c) 2015-2018, Oracle and/or its affiliates.
// This file was modified by Oracle on 2015-2021.
// Modifications copyright (c) 2015-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
@@ -22,20 +22,22 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_INTERFACE_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_EXPAND_INTERFACE_HPP
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/variant/variant_fwd.hpp>
#include <boost/geometry/algorithms/dispatch/expand.hpp>
#include <boost/geometry/core/coordinate_system.hpp>
#include <boost/geometry/core/tag.hpp>
#include <boost/geometry/core/tags.hpp>
#include <boost/geometry/core/visit.hpp>
#include <boost/geometry/geometries/adapted/boost_variant.hpp> // For backward compatibility
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/algorithms/dispatch/expand.hpp>
#include <boost/geometry/strategies/default_strategy.hpp>
#include <boost/geometry/strategies/expand.hpp>
#include <boost/geometry/strategies/detail.hpp>
#include <boost/geometry/strategies/expand/services.hpp>
#include <boost/geometry/util/type_traits_std.hpp>
namespace boost { namespace geometry
@@ -44,26 +46,49 @@ namespace boost { namespace geometry
namespace resolve_strategy
{
template <typename Geometry>
template
<
typename Strategy,
bool IsUmbrella = strategies::detail::is_umbrella_strategy<Strategy>::value
>
struct expand
{
template <typename Box, typename Strategy>
template <typename Box, typename Geometry>
static inline void apply(Box& box,
Geometry const& geometry,
Strategy const& strategy)
{
dispatch::expand<Box, Geometry>::apply(box, geometry, strategy);
}
};
template <typename Box>
template <typename Strategy>
struct expand<Strategy, false>
{
template <typename Box, typename Geometry>
static inline void apply(Box& box,
Geometry const& geometry,
Strategy const& strategy)
{
using strategies::expand::services::strategy_converter;
dispatch::expand
<
Box, Geometry
>::apply(box, geometry, strategy_converter<Strategy>::get(strategy));
}
};
template <>
struct expand<default_strategy, false>
{
template <typename Box, typename Geometry>
static inline void apply(Box& box,
Geometry const& geometry,
default_strategy)
{
typedef typename strategy::expand::services::default_strategy
typedef typename strategies::expand::services::default_strategy
<
typename tag<Geometry>::type,
typename cs_tag<Geometry>::type
Box, Geometry
>::type strategy_type;
dispatch::expand<Box, Geometry>::apply(box, geometry, strategy_type());
@@ -73,10 +98,10 @@ struct expand
} //namespace resolve_strategy
namespace resolve_variant
namespace resolve_dynamic
{
template <typename Geometry>
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
struct expand
{
template <typename Box, typename Strategy>
@@ -87,72 +112,28 @@ struct expand
concepts::check<Box>();
concepts::check<Geometry const>();
concepts::check_concepts_and_equal_dimensions<Box, Geometry const>();
resolve_strategy::expand<Geometry>::apply(box, geometry, strategy);
resolve_strategy::expand<Strategy>::apply(box, geometry, strategy);
}
};
template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
struct expand<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
template <typename Geometry>
struct expand<Geometry, dynamic_geometry_tag>
{
template <typename Box, typename Strategy>
struct visitor: boost::static_visitor<void>
{
Box& m_box;
Strategy const& m_strategy;
visitor(Box& box, Strategy const& strategy)
: m_box(box)
, m_strategy(strategy)
{}
template <typename Geometry>
void operator()(Geometry const& geometry) const
{
return expand<Geometry>::apply(m_box, geometry, m_strategy);
}
};
template <class Box, typename Strategy>
static inline void
apply(Box& box,
boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& geometry,
Strategy const& strategy)
static inline void apply(Box& box,
Geometry const& geometry,
Strategy const& strategy)
{
return boost::apply_visitor(visitor<Box, Strategy>(box, strategy),
geometry);
traits::visit<Geometry>::apply([&](auto const& g)
{
expand<util::remove_cref_t<decltype(g)>>::apply(box, g, strategy);
}, geometry);
}
};
} // namespace resolve_variant
/***
*!
\brief Expands a box using the extend (envelope) of another geometry (box, point)
\ingroup expand
\tparam Box type of the box
\tparam Geometry of second geometry, to be expanded with the box
\param box box to expand another geometry with, might be changed
\param geometry other geometry
\param strategy_less
\param strategy_greater
\note Strategy is currently ignored
*
template
<
typename Box, typename Geometry,
typename StrategyLess, typename StrategyGreater
>
inline void expand(Box& box, Geometry const& geometry,
StrategyLess const& strategy_less,
StrategyGreater const& strategy_greater)
{
concepts::check_concepts_and_equal_dimensions<Box, Geometry const>();
dispatch::expand<Box, Geometry>::apply(box, geometry);
}
***/
} // namespace resolve_dynamic
/*!
\brief Expands (with strategy)
@@ -171,8 +152,7 @@ will be added to the box
template <typename Box, typename Geometry, typename Strategy>
inline void expand(Box& box, Geometry const& geometry, Strategy const& strategy)
{
resolve_variant::expand<Geometry>::apply(box, geometry, strategy);
resolve_dynamic::expand<Geometry>::apply(box, geometry, strategy);
}
/*!
@@ -190,7 +170,7 @@ added to the box
template <typename Box, typename Geometry>
inline void expand(Box& box, Geometry const& geometry)
{
resolve_variant::expand<Geometry>::apply(box, geometry, default_strategy());
resolve_dynamic::expand<Geometry>::apply(box, geometry, default_strategy());
}
}} // namespace boost::geometry