update boost
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// Copyright (c) 2020-2023, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
// 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,7 +18,11 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_MAKE_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_MAKE_HPP
|
||||
|
||||
#include <boost/geometry/algorithms/assign.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include "boost/geometry/algorithms/detail/assign_values.hpp"
|
||||
|
||||
#include <boost/geometry/core/make.hpp>
|
||||
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
@@ -32,12 +40,10 @@ namespace detail { namespace make
|
||||
\tparam Range \tparam_range_point
|
||||
\param range \param_range_point
|
||||
\return The constructed geometry, here: a linestring or a ring
|
||||
|
||||
\qbk{distinguish, with a range}
|
||||
\qbk{
|
||||
[heading Example]
|
||||
[make_with_range] [make_with_range_output]
|
||||
|
||||
[heading See also]
|
||||
\* [link geometry.reference.algorithms.assign.assign_points assign]
|
||||
}
|
||||
@@ -75,7 +81,12 @@ inline Geometry make_points(Range const& range)
|
||||
\* [link geometry.reference.algorithms.assign.assign_values_3_2_coordinate_values assign]
|
||||
}
|
||||
*/
|
||||
template <typename Geometry, typename Type>
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Type,
|
||||
std::enable_if_t<! traits::make<Geometry>::is_specialized, int> = 0
|
||||
>
|
||||
inline Geometry make(Type const& c1, Type const& c2)
|
||||
{
|
||||
concepts::check<Geometry>();
|
||||
@@ -90,6 +101,23 @@ inline Geometry make(Type const& c1, Type const& c2)
|
||||
return geometry;
|
||||
}
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Type,
|
||||
std::enable_if_t<traits::make<Geometry>::is_specialized, int> = 0
|
||||
>
|
||||
constexpr inline Geometry make(Type const& c1, Type const& c2)
|
||||
{
|
||||
concepts::check<Geometry>();
|
||||
|
||||
// NOTE: This is not fully equivalent to the above because assign uses
|
||||
// numeric_cast which can't be used here since it's not constexpr.
|
||||
return traits::make<Geometry>::apply(c1, c2);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief Construct a geometry
|
||||
\ingroup make
|
||||
@@ -109,7 +137,12 @@ inline Geometry make(Type const& c1, Type const& c2)
|
||||
\* [link geometry.reference.algorithms.assign.assign_values_4_3_coordinate_values assign]
|
||||
}
|
||||
*/
|
||||
template <typename Geometry, typename Type>
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Type,
|
||||
std::enable_if_t<! traits::make<Geometry>::is_specialized, int> = 0
|
||||
>
|
||||
inline Geometry make(Type const& c1, Type const& c2, Type const& c3)
|
||||
{
|
||||
concepts::check<Geometry>();
|
||||
@@ -124,6 +157,22 @@ inline Geometry make(Type const& c1, Type const& c2, Type const& c3)
|
||||
return geometry;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename Type,
|
||||
std::enable_if_t<traits::make<Geometry>::is_specialized, int> = 0
|
||||
>
|
||||
constexpr inline Geometry make(Type const& c1, Type const& c2, Type const& c3)
|
||||
{
|
||||
concepts::check<Geometry>();
|
||||
|
||||
// NOTE: This is not fully equivalent to the above because assign uses
|
||||
// numeric_cast which can't be used here since it's not constexpr.
|
||||
return traits::make<Geometry>::apply(c1, c2, c3);
|
||||
}
|
||||
|
||||
|
||||
template <typename Geometry, typename Type>
|
||||
inline Geometry make(Type const& c1, Type const& c2, Type const& c3, Type const& c4)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user