te
proxy
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
te
-
rust-like traits on plain C++ with short macro (type erasure actually)
Or dyno or Poly or Not-Actually-Boost.TE or ...
-
C++ Polymorphism Without Inheritance Using Glaze
https://github.com/boost-ext/te Boost TE ("unnoficial boost project")
-
[C++20] New way of meta-programming?
https://github.com/boost-ext/te (for SBO performance and type.erasure call syntax)
-
Type Erasure in C++ Explained
And if it were in the standard there wouldn't be at least five well known libraries implementing it (including from Adobe and from Facebook): https://github.com/boost-ext/te#similar-libraries
As far as I know (I don't really follow the committee work) the latest attempt to introduce run-time duck-typing in the standard was https://github.com/andyprowl/virtual-concepts, which seems dead.
proxy
-
Static Interfaces, concepts vs de-virtualisation?
Proxy seems more likely than Dyno or AnyAny to be a standard way of doing this in C++'s future.
-
C++ Polymorphism Without Inheritance Using Glaze
https://github.com/microsoft/proxy Implementation submitted for standarization
-
Runtime Concept Idiom: Opinions
So basically you have to undo the type erasure? I think I'm going to try the proxy library found here. https://github.com/microsoft/proxy
What are some alternatives?
dyno - Runtime polymorphism done right
iface - Anonymous, non-intrusive interfaces in C++
entt - Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more
Aggreget - Use your structures like tuples. Similar to MagicGet but using C++ 20 concepts.
actix-net - A collection of lower-level libraries for composable network services.
kumi - C++20 Compact Tuple Tools
glaze - Extremely fast, in memory, JSON and interface library for modern C++
glfwpp - GLFW C++ Wrapper - thin, modern, C++17, header-only GLFW wrapper
azula - A fast, statically typed compiled language
hsm - Finite state machine library based on the boost hana meta programming library. It follows the principles of the boost msm and boost sml libraries, but tries to reduce own complex meta programming code to a minimum.
polytail - Rust-like trait-based polymorphism for C++