ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
json.hpp File Reference

Wrapper for nlohmann/json that works around abs macro conflicts. More...

#include <nlohmann/json.hpp>

Go to the source code of this file.

Detailed Description

Wrapper for nlohmann/json that works around abs macro conflicts.

Some platform toolchains define abs as a C-style preprocessor macro (#define abs(x) ...) instead of using std::abs. This breaks GCC's <valarray> header, which nlohmann/json includes. We temporarily save and undefine the macro around the include, then restore it so that downstream code relying on the macro remains unaffected.