Enable move semantics for socket types#2658
Conversation
08f4f7e to
43b07d3
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2658 +/- ##
==========================================
+ Coverage 30.68% 30.74% +0.06%
==========================================
Files 229 229
Lines 19718 19733 +15
Branches 4725 4728 +3
==========================================
+ Hits 6050 6067 +17
- Misses 12915 13045 +130
+ Partials 753 621 -132
... and 53 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
kimci86
left a comment
There was a problem hiding this comment.
Nitpicking. Otherwise it looks correct.
43b07d3 to
b8044f1
Compare
|
I included the Clang CI fix in this PR because other CI is guaranteed to fail. See #2661 for more information. |
You can edit this PR base branch to |
b8044f1 to
0d1f7f0
Compare
0d1f7f0 to
b168c55
Compare
|
I removed the CI failure workarounds from this PR since it appears that GitHub has fixed the issues. |
b168c55 to
95b0e5e
Compare

Description
This one wasn't entirely trivial because I had to write custom move operations for
sf::Socketto ensure that a socket isn't closed after it's moved-from. The move operations ensure that the moved-from socket is given an invalid socket handle so that whencloseis called nothing happens. Enabling move semantics forsf::Sockethad the downstream affect of enabling move semantics for 3 different derived classes. It's great how the type trait tests so easily detect and confirm that fact.As a prerequisite I wrote up some
sf::Sockettests since this class was lacking any.