From 100279be6c667a7ee9e3c21e4c6d824f2671b297 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sun, 29 Dec 2024 17:32:10 +0100 Subject: [PATCH] try again with constexpr --- libsrc/meshing/meshtype.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index e8c68e36..2598d056 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -305,14 +305,14 @@ namespace netgen { public: PointIndices () = default; - PointIndices (const PointIndices&) = default; - PointIndices (PointIndices&&) = default; + constexpr PointIndices (const PointIndices&) = default; + constexpr PointIndices (PointIndices&&) = default; PointIndices & operator= (const PointIndices&) = default; PointIndices & operator= (PointIndices&&) = default; constexpr PointIndices (INDEX_2 i2) : INDEX_2(i2) { ; } constexpr PointIndices (PointIndex i1, PointIndex i2) : INDEX_2(i1,i2) { ; } - PointIndex operator[] (int i) const { return PointIndex(INDEX_2::operator[](i)); } + constexpr PointIndex operator[] (int i) const { return PointIndex(INDEX_2::operator[](i)); } PointIndex & operator[] (int i) { return reinterpret_cast(INDEX_2::operator[](i)); } PointIndex & I1 () { return (*this)[0]; }