-
Notifications
You must be signed in to change notification settings - Fork 680
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
Port the code to C++11 #977
Comments
I'd like to help with this. |
Not directly related with C++11 but also, library have some many C style casts, which can be easily located by using |
Hi @seladb - I would like to collaborate on this task. Is there any task breakdown already or is there any progress? UPDATE - based on the Release notes (changes from v22.05) it seems this issue/ticket should be closed... |
Hi @jpcofr , thanks for offering your help! Actually, the reason this issue is still open is because this is an ongoing effort. We migrated to C++11 about a year ago, but a lot of the code base is still in C++98 style (definitely most of the code that was written more than a year ago). For example: we don't always use As I mentioned above - we don't expect a huge PR that fixes all of these things. We actually prefer small PRs that make incremental fixes, and we hope that we can slowly migrate as much of the code as possible. It'd be really great if you can help. I'd like to thank you again and I'm looking forward to seeing your contributions! 🙏 🙏 |
@seladb ok I can collaborate. I am new to this repo so I need to check out how is everything working. What would be the next namespace/class etc. that you would like to be ported? I can start from there... |
@jpcofr If you want you can start with Please let me know if you need any help |
btw, maybe we can change the issue to C++20 directly. |
@tigercosmos for now I prefer to keep supporting C++11 to support a broader variety of platforms and devices |
Another thing is replacing |
Hi @seladb , I would also like to collaborate on this, is it still open? |
Yes sure, you're more than welcome to contribute! 🙏 |
Great! I'm still looking through the repo but is there anywhere I should start for what should be ported next? |
No, you can start at any place that uses C++98 instead of C++11. You can also refer to some merged PR for references. |
@Dimi1010 What are your thoughts on how much we still have to finish? |
I think the For C-casts, I clean them up as I find them, but there are still plenty to go around... and it sucks you can't find them easily with a find command... Two things I might add to the list:
|
@Dimi1010 For c style casts you can use |
Hi, i am trying to familiarise myself with the code base so i can later contribute with some tasks. This looks like a good way to start so i'd be happy to port some code to C++11 if that's OK ? I'll look at files in Packet++ first. if there's anything specific that should be done first please let me know. |
Hi @lumiZGorlic ! Thank you so much for considering contributing to this project! 🙏 |
@lumiZGorlic The code under |
Hi @seladb ,I would like to contribute for the Examples and get familiar with the code base |
Sure @DeepakReddy1999 you're more than welcome to contribute! 🙏 |
Hi @seladb .There are still some NULLs in the code. Should we change it? |
@DeepakReddy1999 Yes, please go ahead. |
There are very few instances of |
For Windows API related NULLs, maybe a comment should be added to all of them to prevent future changes? With reference to MSDN page @seladb shared recently. |
I agree with @egecetin. |
We recently moved to C++11 and big parts of the code are still using C++98 style.
This will be an ongoing task to port more and more parts of the code to C++11.
For example:
Usenullptr
instead ofNULL
auto
where possibleenum class
moredelete
,default
,override
where neededunordered_map
instead ofmap
for better performanceIMPORTANT: this change can (and should) be done incrementally. Please try to open small PRs with not a lot of changes that are easy to review
The text was updated successfully, but these errors were encountered: