Closed strfry closed 5 years ago
How do you reproduce this problem?
Maybe the right fix is using inline
instead?
You are right, inline
is the better fix, i changed it.
I haven't build a minimal example for reproducing yet, the problem appears in context of a larger project.
Let me know if you decide you need a further demonstration.
I manually merged your commit in 2b275951fcc0301a7fd8253e40179749ea0f676f
I kept static
because inline
is C++17 only.
Thanks for the patch.
C++ doesn't seem to guarantee that a constexpr global variable doesn't take runtime space, and thus might lead to linker errors when included in several compilation units.
I don't see why the variable isn't declared static here, so i propose this simple fix to make it work for us on clang.