enum_name (yet another enum to/from string conversion utility >=C++11)

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • enum_name

    Converting (scoped)enum values to string names written in C++>=11.

  • enum_traits

    Type traits for properties of C / C++ enum types

  • 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.

  • 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.

    InfluxDB logo
  • glaze

    Extremely fast, in memory, JSON and interface library for modern C++

  • 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.

  • 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

  • What does this have to offer over magic_enum?

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts