Skip to content

Provide conditional support for C++17 inline variables

Steffen Müthing requested to merge feature/wrap-inline-variable-support into master

Inline variables are a C++17 feature that gives variables the same type of linkage as inline functions, which avoids object file bloat and linker problems.

For us, this is mostly interesting in the context of constexpr variables like the partition sets provided in dune-grid: Right now, a separate copy of those objects is emitted by each translation unit, and those copies do not get merged by the linker. This has created problems in the past and forced us to place the variables in an anonymous namespace, which creates unique symbol names for each translation unit.

With inline variables, the problem will eventually go away.

Merge request reports

Loading