mirror of
https://github.com/logos-co/logos-cpp-sdk.git
synced 2026-08-31 01:31:10 +00:00
Mirrors logos-protocol fix/integral-float-accept. The generator emits its OWN codec into <name>_types.h, so the rule has to be applied twice or half the platform disagrees — the same split that made the original scalar fix need two sites. #115 made the emitted integer codecs check signedness, and in doing so they started rejecting 3.0 as well as 3.7. Four test_basic_module_cpp cases pass a whole-valued double where the contract declares an integer, and they are right: JSON does not distinguish 3 from 3.0, and this same codec accepts an integral number for float64 on exactly that reasoning. A float now decodes as an integer when it has no fractional part and fits. 3.7 is still refused. Also adds <cmath> to the emitted include set for std::modf. verified: test-modules 176/176 with the four cases restored, conformance matrix unchanged at 170 pass / 2 xfail. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>