Simple `struct` static reflection system I use that tracks names, attributes (in my own code I also keep `constexpr` hashes of names) -- example gets fully inlined into `main()`

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

    range-v3 views and actions for Arrow C++

  • An advanced usage example can be seen here. Arrow stores structs in structure of arrays layout, and I use Boost.Hana to do this conversion. My linked code consists of two chained range-v3 views (separated by '|' on line 308).

  • hana

    Your standard library for metaprogramming

  • And then there's also the longstanding issue with default member initializers -- https://github.com/boostorg/hana/issues/409 -- which was a deal-breaker.The PROP system avoids this issue precisely by having the macro be as local as possible: the default member initializer is outside the macro. It does this while still letting you attach additional PropAttribs metadata (I'm not sure what additional metadata attachment looks like in Hana? haven't really tried). Default values and additional attributes are by and large quite more important to me in my use cases for reflection (component types in game ECS) than range syntax (everything I've needed and can think of needing is covered by for-each loop).

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