Commit 1a96ae05 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'circulator-gcc6-fix' into 'master'

fix CirculatorT type-pun warning on GCC6

fixes #28

See merge request !78
parents cb5bc2b2 5ee25a5a
Pipeline #2418 passed with stage
in 78 minutes and 54 seconds
......@@ -314,13 +314,15 @@ class GenericCirculatorT : protected GenericCirculatorBaseT<Mesh> {
/// Standard dereferencing operator.
value_type operator*() const {
// We can't use this due to a GCC6 compiler bug
const GenericCirculatorBaseT<Mesh>* self = this;
#ifndef NDEBUG
assert(this->heh_.is_valid());
value_type res = (this->*Handle2Value)();
value_type res = (self->*Handle2Value)();
assert(res.is_valid());
return res;
#else
return (this->*Handle2Value)();
return (self->*Handle2Value)();
#endif
}
......@@ -498,13 +500,15 @@ class GenericCirculatorT_DEPRECATED : protected GenericCirculatorBaseT<Mesh> {
/// Standard dereferencing operator.
value_type operator*() const {
// We can't use this due to a GCC6 compiler bug
const GenericCirculatorBaseT<Mesh>* self = this;
#ifndef NDEBUG
assert(this->heh_.is_valid());
value_type res = (this->*Handle2Value)();
value_type res = (self->*Handle2Value)();
assert(res.is_valid());
return res;
#else
return (this->*Handle2Value)();
return (self->*Handle2Value)();
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment