mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
Merge pull request #1056 from stefan301/fix-cpp20-compile-error
Fix C++20 compilation errors related to conditional expression
This commit is contained in:
commit
516e4539c6
@ -223,16 +223,18 @@ struct turn_info_verification_functions
|
||||
BOOST_GEOMETRY_ASSERT(index_p > 0 && index_p <= 2);
|
||||
BOOST_GEOMETRY_ASSERT(index_q > 0 && index_q <= 2);
|
||||
|
||||
using distance_measure_result_type = typename geometry::coordinate_type<decltype(ti.point)>::type;
|
||||
|
||||
bool const p_in_range = index_p < range_p.size();
|
||||
bool const q_in_range = index_q < range_q.size();
|
||||
ti.operations[IndexP].remaining_distance
|
||||
= p_in_range
|
||||
? distance_measure(ti.point, range_p.at(index_p))
|
||||
: 0;
|
||||
: distance_measure_result_type{0};
|
||||
ti.operations[IndexQ].remaining_distance
|
||||
= q_in_range
|
||||
? distance_measure(ti.point, range_q.at(index_q))
|
||||
: 0;
|
||||
: distance_measure_result_type{0};
|
||||
|
||||
if (p_in_range && q_in_range)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user