diff --git a/src/StdCompiler.h b/src/StdCompiler.h index c0c28dfc1..4d0130a25 100644 --- a/src/StdCompiler.h +++ b/src/StdCompiler.h @@ -209,6 +209,14 @@ class StdCompiler void Value(bool &rBool) { Boolean(rBool); } void Value(std::string &rString, StdCompiler::RawCompileType eRawType = StdCompiler::RCT_Escaped) { String(rString, eRawType); } + template requires (!std::same_as && std::same_as, long long>) + void Value(T &rInt) + { + std::conditional_t, std::int64_t, std::uint64_t> value{rInt}; + Value(value); + rInt = value; + } + // Compiling/Decompiling (may throw a data format exception!) template inline void Compile(T &&rStruct) {