From 064dcaeafd4a9ddc6aa222b804f4c516c0a0de27 Mon Sep 17 00:00:00 2001 From: Jeremiah <4462211+jeremiahpslewis@users.noreply.github.com> Date: Mon, 17 Feb 2025 02:02:27 +0100 Subject: [PATCH] Fix error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor] (#5110) --- CHANGELOG.md | 1 + valhalla/midgard/vector2.h | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9985023050..58248c5f75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * FIXED: Get CostMatrix allow second pass option from new location in config [#5055](https://github.com/valhalla/valhalla/pull/5055/) * FIXED: Slim down Matrix PBF response [#5066](https://github.com/valhalla/valhalla/pull/5066) * FIXED: restore ignoring hierarchy limits for bicycle and pedestrian [#5080](https://github.com/valhalla/valhalla/pull/5080) + * FIXED: GCC warning 'template-id not allowed for constructor in C++20' [#5110](https://github.com/valhalla/valhalla/pull/5110) * **Enhancement** * ADDED: Consider smoothness in all profiles that use surface [#4949](https://github.com/valhalla/valhalla/pull/4949) * ADDED: `admin_crossings` request parameter for `/route` [#4941](https://github.com/valhalla/valhalla/pull/4941) diff --git a/valhalla/midgard/vector2.h b/valhalla/midgard/vector2.h index 37d88effc8..f6e0a1dc70 100644 --- a/valhalla/midgard/vector2.h +++ b/valhalla/midgard/vector2.h @@ -19,7 +19,7 @@ template class VectorXY { /** * Default constructor */ - VectorXY() : x_(0.0), y_(0.0) { + VectorXY() : x_(0.0), y_(0.0) { } /** @@ -27,7 +27,7 @@ template class VectorXY { * origin to the point. * @param p Point. */ - VectorXY(const PointXY& p) : x_(p.x()), y_(p.y()) { + VectorXY(const PointXY& p) : x_(p.x()), y_(p.y()) { } /** @@ -35,7 +35,7 @@ template class VectorXY { * @param x x component of the vector. * @param y y component of the vector. */ - VectorXY(const PrecisionT x, const PrecisionT y) : x_(x), y_(y) { + VectorXY(const PrecisionT x, const PrecisionT y) : x_(x), y_(y) { } /** @@ -43,7 +43,7 @@ template class VectorXY { * @param from Point at origin of the vector. * @param to Point at end of vector */ - VectorXY(const PointXY& from, const PointXY& to) + VectorXY(const PointXY& from, const PointXY& to) : x_(to.x() - from.x()), y_(to.y() - from.y()) { } @@ -51,7 +51,7 @@ template class VectorXY { * Copy constructor. * @param w Vector to copy to the new vector. */ - VectorXY(const VectorXY& w) : x_(w.x()), y_(w.y()) { + VectorXY(const VectorXY& w) : x_(w.x()), y_(w.y()) { } /**