mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
calling ctor
This commit is contained in:
parent
990fb0657c
commit
3c273bf537
@ -202,14 +202,14 @@ namespace netgen
|
|||||||
explicit constexpr operator T& () { return i; }
|
explicit constexpr operator T& () { return i; }
|
||||||
public:
|
public:
|
||||||
constexpr operator TIndex() const { return TIndex(i); }
|
constexpr operator TIndex() const { return TIndex(i); }
|
||||||
constexpr operator TIndex&() { return static_cast<TIndex&>(*this); }
|
operator TIndex&() { return static_cast<TIndex&>(*this); }
|
||||||
|
|
||||||
TIndex operator++ (int) { TIndex hi{*this}; i++; return hi; }
|
TIndex operator++ (int) { TIndex hi{*this}; i++; return hi; }
|
||||||
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; }
|
||||||
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 *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; }
|
void Invalidate() { i = long(TIndex::BASE)-1; }
|
||||||
bool IsValid() const { return i+1 != TIndex::BASE; }
|
bool IsValid() const { return i+1 != TIndex::BASE; }
|
||||||
// operator bool() const { return IsValid(); }
|
// operator bool() const { return IsValid(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user