Skip to content

Fix for missing symbol errors on some platforms.

David Thompson requested to merge dcthomp/vtk:invalid-invalid into master

Some platforms (macos/clang, freebsd/gcc) generate link errors for the token library:

ld: error: undefined reference due to --no-allow-shlib-undefined: vtktoken::Manager::Invalid

and

ld: Undefined symbols:
  vtktoken::Manager::Invalid, referenced from:
      vtktoken::Manager::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int) in Manager.cxx.o

because they mistakenly require the constant value to be treated as a static variable; since it is not, they generate a link error. To fix this, we convert Invalid into an inline constexpr function.

Edited by David Thompson

Merge request reports