From 3c273bf5376d3eda8914ddd3386034cb9ceeece8 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Tue, 31 Dec 2024 13:13:57 +0100 Subject: [PATCH] calling ctor --- libsrc/meshing/meshtype.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index 6be61848..08b3c87f 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -202,14 +202,14 @@ namespace netgen explicit constexpr operator T& () { return i; } public: constexpr operator TIndex() const { return TIndex(i); } - constexpr operator TIndex&() { return static_cast(*this); } + operator TIndex&() { return static_cast(*this); } TIndex operator++ (int) { TIndex hi{*this}; i++; return hi; } TIndex operator-- (int) { TIndex hi(*this); i--; return hi; } TIndex & operator++ () { i++; return *this; } TIndex operator-- () { i--; return *this; } constexpr TIndex & operator+= (T add) & { i += add; return *this; } - constexpr TIndex operator+= (T add) && { i += add; return TIndex(*this); } + constexpr TIndex operator+= (T add) && { i += add; return TIndex{*this}; } void Invalidate() { i = long(TIndex::BASE)-1; } bool IsValid() const { return i+1 != TIndex::BASE; } // operator bool() const { return IsValid(); }