[SERVER-32070] Remove stdx::bind (and others from functional.h) Created: 22/Nov/17 Updated: 30/Oct/23 Resolved: 16/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.2 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Platforms 2017-12-18, Platforms 2018-01-29 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Nearly all uses of std::bind (and therefore its alias stdx::bind) are superseded by polymorphic lambdas in C++14. There are approximately 200 uses that can be relatively easily be replaced with cleaner and safer lambda code. Code relying on std::bind incurs some subtle risks that we don't need to take. |
| Comments |
| Comment by Githook User [ 16/Jan/18 ] |
|
Author: {'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue', 'username': 'BillyDonahue'}Message: |
| Comment by Billy Donahue [ 20/Dec/17 ] |
|
Deferring for about a month while we wait for 3.6 backports to slow down. Completing this ticket would mean relaxing the linter's complaints about using the std:: versions of these. |
| Comment by Githook User [ 14/Dec/17 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: |
| Comment by Githook User [ 06/Dec/17 ] |
|
Author: {'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}Message: workaround gcc bug |
| Comment by Billy Donahue [ 04/Dec/17 ] |
|
When using generic lambdas, work around a gcc bug by using explicit `this->`, or prefer non-generic lambdas when developing replacement code. Bug 67274 - Inconsistent `this->` required when calling member function in a lambda capturing `this` through another function |
| Comment by Githook User [ 04/Dec/17 ] |
|
Author: {'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue'}Message: Work around GCC bug#67274 with explicit this-> syntax. |
| Comment by Githook User [ 02/Dec/17 ] |
|
Author: {'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev'}Message: Revert " This reverts commit 7dc61c0f0c0160ad6cba831a0e12bef501ef3ad5. |
| Comment by Githook User [ 01/Dec/17 ] |
|
Author: {'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}Message: [branch stdx_bind_1] |
| Comment by Githook User [ 28/Nov/17 ] |
|
Author: {'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}Message: git diff master stdx_bind src/mongo/db/repl/sync_tail.cpp | patch -p1 |