Magic Enum C++
C++ Middleware Writer
Our great sponsors
Magic Enum C++ | C++ Middleware Writer | |
---|---|---|
44 | 98 | |
4,375 | 59 | |
- | - | |
8.4 | 8.6 | |
14 days ago | 10 days ago | |
C++ | C++ | |
MIT License | BSD license |
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.
Magic Enum C++
-
What C++ library do you wish existed but hasn’t been created yet?
I'm not sure this is quite what you're asking for, but this library has been super helpful to me in the past : https://github.com/Neargye/magic_enum
-
Fully Permissive License C++ Logger For Embedded System
Also, a shoutout to Magic Enum: https://github.com/Neargye/magic_enum
-
enum_name (yet another enum to/from string conversion utility >=C++11)
What does this have to offer over magic_enum?
-
quill v2.7.0 released - Asynchronous Low Latency C++ Logging Library
But it's a hack, and I prefer not to use hacks in production, because of their significant limitations:
-
Enums with methods
Why reinvent the wheel? magic_enum
-
Macro to write enum and converter from and to string
I strongly recommend that you instead use magic_enum::enum_cast
Magic Enum provides that.
-
New to Programming and Would Like a Code Review or Tips on Readability
While I can understand the sentiment behind that it makes for a poor solution because people seeing the enum will assume it's a valid entry. A better solution is to use something like magic enum for that case.
-
What are some cool modern libraries you enjoy using?
magic_enum by far. It has an extreme amount of black magic, and compiler specific stuff all abstracted away behind its extremely neat user interface.
-
what annoys you most while using c++?
magic_enum
C++ Middleware Writer
-
What led you to use Linux as your daily driver?
I started with Linux in the late 90s. I switched to FreeBSD around 2013 and returned to Linux a couple of years ago. Io_uring was the main reason I had to come back. At first I ported the back tier of my code generator back to Linux and then I ported the middle tier from being POSIX based to Linux.
-
295 pages on Initialization in Modern C++, a new cool book!
More concretely, I use it to generate code that's used in each of the tiers mentioned above. The link is to one example of that.
-
Unknown contributor
A few years ago a second contributor showed up on my repo. I don't know who they (bk752) are. To my knowledge they didn't contribute anything.
and got: Merge branch 'dev' of https://github.com/Ebenezer-group/onwards into dev Fork of mmap files from mandreyel on github Merge branch 'master' of https://github.com/Ebenezer-group/onwards
-
I love building a startup in Rust. I wouldn't pick it again.
Thanks for bringing these up. Some people are "rustifying" C++ code also. I'm doing what I can to improve C++ by developing an on-line code generator. It's implemented as a 3-tier system. The front tier is less than 30 lines long and is very portable.
-
What kind of SaaS possible as Backend Software Engineer?
I have a C++ code generator that's implemented as a service. Originally (around 2002) I had a 2-tier architecture with a web interface. Eventually I realized I should switch to a command line interface and then moved to a 3-tier architecture. My front tier might be of interest to you. It's only 27 lines. It's pretty nice to have that minimal of a front end.
-
Greatest programs
This is one of my best programs. It's about 13 years old. It has some global variables though. It could have zero globals, but more lines and result in a larger binary.
-
UDP assistance
I have some support for UDP in this library. This program is a UDP server and uses the library.
-
Performance of sort is worse than it's Java equivalent.
I briefly considered Java in terms of on-line code generation years ago, but it's a brittle language imo. With C++, for example, we can keep machine written code separate from code written by people.
-
How to learn C++ for embedded
My messaging and serialization library is not specifically for embedded development, but for years people have asked me if I'm coming from an embedded background, because of the approach I've taken. It's a SaaS that helps to minimize the amount of code you have to download/build/maintain.
What are some alternatives?
Nameof C++ - Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
Protobuf - Protocol Buffers - Google's data interchange format
cereal - A C++11 library for serialization
FlatBuffers - FlatBuffers: Memory Efficient Serialization Library
Boost.Serialization - Boost.org serialization module
pfr - std::tuple like methods for user defined types without any macro or boilerplate code
rttr - C++ Reflection Library
wise_enum - A reflective enum implementation for C++
protozero - Minimalist protocol buffer decoder and encoder in C++
Bitsery - Your binary serialization library
cppbor - An implementation of cbor using C++ 17 variants
stm32-hal - This library provides access to STM32 peripherals in Rust.