ABRG-Models / morphologica

A library of supporting code for numerical modelling (JSON config, HDF5 data, Modern OpenGL visualization)
https://abrg-models.github.io/morphologica/
Apache License 2.0
255 stars 29 forks source link

`morph::vec::operator+=` may not be used in a constexpr function #248

Closed sebjameswml closed 1 week ago

sebjameswml commented 2 weeks ago

Because it uses *this.

sebjameswml commented 2 weeks ago

Related to #219

sebjameswml commented 1 week ago

You can use it in a constexpr function, as long as the thing your +=ing isn't constexpr itself. See plusequals test in testvec_constexpr.