-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernizing c++ code #8491
Comments
I would like to modernize the code used in It just a lot of work to do. |
Here are some tips: 1. Adopt C++23 FeaturesC++23 introduces several features that can simplify and modernize your code. Here are some key features to consider: a.
|
@dbaileychess @ZERO-70 I wish flatc would generate code in this style as well. Considering the current shift towards C++26, C++11-style code feels outdated. On top of that, it would be great if union were also replaced with std::variant. |
I totally agree with your wish! With C++ moving forward so quickly, it makes sense for tools like flatc to adopt modern standards. Using std::variant instead of unions would definitely make the generated code safer and more in line with current best practices. Hopefully, they consider this in future updates! |
Do you have any plan to modernize generated c++ code by using c++ 23?
Not just using std::optional or std::span, also complete rewriting for simplicity, readability like protobuf.
Cascading get/set, simplest easist API.
The text was updated successfully, but these errors were encountered: