-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
Service arch 2020-05-04
std::bind has some special behavior that can kick in at surprising times.
- It has a special case interaction with std::reference_wrapper.
- It has a special case interaction when bind expressions are bound to each other.
- It can silently ignore trailing arguments.
An analysis of the problems here: https://abseil.io/tips/108
Unless you need behaviors 1 or 2, you're better off with a polymorphic lambda.
Replace std::bind in all other cases (only 2 files), so we don't get used to seeing it in the codebase. A previous sweep (SERVER-32070) eliminated previous calls.
- is related to
-
SERVER-32070 Remove stdx::bind (and others from functional.h)
- Closed