-
years ago i made a lib that tries to avoid the duplication in e.g. json->is_eof(json)
https://github.com/montyanderson/foop
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
You could tag dynamically allocated objects with some magic bytes. To check whether a string is dynamically allocated, you can simply check whether it starts with those magic bytes. This is a probabilistic method, but if you use enough magic bytes, it becomes basically impossible to go wrong.
See e.g. https://github.com/99991/dynamic/blob/a423a04061ee44bad0720f... for an example (incidentally also a C JSON parser).
-
Here's something like that I wrote in 2017 for JSON using Boost.Fusion + overload resolution of a single 'from_json' function for JSON parsing.
https://gist.github.com/nlyan/045fbe075b4e51d83be0cf4513fecd...
The DEFINE_JSON macro is a tiny wrapper around BOOST_FUSION_DEFINE_STRUCT
https://www.boost.org/doc/libs/1_87_0/libs/fusion/doc/html/f...
The code predates broad availability of std::optional and the existence of Boost.JSON, so if i were using this technique today that's what I'd use, but at the time I used taocpp (which is still actively maintained 8 years later)
https://github.com/taocpp/json
-
refl-cpp
Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).
It's definitively different than Frunk, the library is not a general-purpose functional toolkit. One could certainly implement it with Zig's compile-time reflection with ease (don't know much about D). Actually, it's superficially similar to refl-cpp's serialization example [1], but with far less templating magic underneath due to the restricted scope.
[1] https://github.com/veselink1/refl-cpp/blob/master/examples/e...