mirror of
https://github.com/nlohmann/json.git
synced 2026-10-10 16:53:41 +07:00
The custom object key tests from #5328 instantiate a second basic_json specialization in unit-cbor.cpp and unit-msgpack.cpp. This pushed unit-msgpack.cpp.obj past 65535 sections in the clang (MinGW) jobs of the Windows workflow, and linking test-msgpack_cpp11 fails with "relocation truncated to fit: IMAGE_REL_AMD64_REL32 against `.rdata'". The GNU linker keeps the section an associative COMDAT section belongs to in 16 bits (x_associated in include/coff/internal.h), although big object files store 32 bits. In larger objects it therefore ties the jump tables of inline functions to the wrong function and discards them together with that function's duplicate. Move the four tests unchanged into unit-custom-object-key-type.cpp and document the limit in windows.yml. Signed-off-by: Niels Lohmann <mail@nlohmann.me>