Skip to content

Avoid using static global variables in Constants #56

@jlbabilino

Description

@jlbabilino

This can cause issues across shared object boundaries, only ever use constexpr in Constants.hpp.

One way to fix this is to convert this:

const MyType value;

to

const MyType& GetVal() {
  static MyType val;
  return val;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions