Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Magic Enum C++
Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
On the topic of this kind of hackflection willwray/enum_traits uses an interesting trick where they improve buildtime performance by doing the __PRETTY_FUNCTION__/__FUNCSIG__/std::source_location::current().function_name() inside a variadic templated function to do the name conversion for a batch of integers at the same time to make it less expensive (compiletime) to test a large range of numbers.
I ended up adopting this approach in some test code https://godbolt.org/z/GKW8Preva when I was thinking about adding automatic enum serialization/deserialization to stephenberry/glaze. But there are too many limitations.
What does this have to offer over magic_enum?
Related posts
- what is the best API for serialization?
- What C++ library do you wish existed but hasn’t been created yet?
- Behind the magic of magic_enum
- quill v2.7.0 released - Asynchronous Low Latency C++ Logging Library
- alpaca: A new serialization library written in C++17 - Pack C++ structs into a compact byte-array without any macros or boilerplate