Skip to content

Commit

Permalink
Fix PolygonX constructors
Browse files Browse the repository at this point in the history
g++ 14.1.1 complains _constantly_ about this, otherwise:

```text
.../src/framework/draw/types/geometry.h:449:23: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
  449 |     inline PolygonX<T>() = default;
      |                       ^
.../src/framework/draw/types/geometry.h:449:23: note: remove the ‘< >’
.../src/framework/draw/types/geometry.h:450:23: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
  450 |     inline PolygonX<T>(const std::vector<PointX<T> >& v) : std::vector<PointX<T> >(v) {
      |                       ^
.../src/framework/draw/types/geometry.h:450:23: note: remove the ‘< >’
.../src/framework/draw/types/geometry.h:452:24: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
  452 |     inline PolygonX<T>(size_t size) : std::vector<PointX<T> >(size) {
      |                        ^~~~~~
```
  • Loading branch information
ferdnyc committed Aug 11, 2024
1 parent 6d84375 commit 75f2dcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/framework/draw/types/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,10 @@ class PolygonX : public std::vector<PointX<T> >
{
public:

inline PolygonX<T>() = default;
inline PolygonX<T>(const std::vector<PointX<T> >& v) : std::vector<PointX<T> >(v) {
inline PolygonX() = default;
inline PolygonX(const std::vector<PointX<T> >& v) : std::vector<PointX<T> >(v) {
}
inline PolygonX<T>(size_t size) : std::vector<PointX<T> >(size) {
inline PolygonX(size_t size) : std::vector<PointX<T> >(size) {
}

inline PolygonX<T>& operator<<(const PointX<T>& p)
Expand Down

0 comments on commit 75f2dcf

Please sign in to comment.