Skip to content

Make the enum QuadratureTypes::Enum a proper enum class

Simon Praetorius requested to merge feature/quadrature-type-enum-class into master


Since c++11 we have enum classes to solve the problem of scoped names for enums. This MR replaces the old workaround with a proper enum class for QuadratureType. This will allow in future c++ standards to use QuadratureTypes inside of switch case statements and makes the code more readable.


In order to use enum class types as integers, e.g. as index in a vector, it must be explicitly converted into the underlying integer type. No implicit conversion happens. Once the quadrature cache is replaced with a proper map, this cast is not longer necessary. See !174.

Edited by Simon Praetorius

Merge request reports