| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
`std::function` even after LWG-2774
[LWG-2774](https://wg21.link/lwg2774) changes `std::function`'s converting constructor to accept its argument by forwarding reference. With that change implemented, that constructor becomes a better match for non-`const` `unique_function` arguments than `unique_function`'s `const`-qualified deleted conversion operator template to `std::function`. As a result, `std::is_convertible_v<unique_function<T>, std::function<T>>` changes from `false` to `true` when Standard Libraries implement LWG-2774. (MSVC recently implemented this LWG issue in https://github.com/microsoft/STL/pull/2098 and noticed the `unique_function` test failing as a result.)
I believe the fix is to add another deleted conversion operator template that is not `const`-qualified to `unique_function`. This makes the test pass locally, as well as correcting a simplified test case with GCC trunk (https://github.com/microsoft/STL/pull/2098) which I believe also implements LWG-2774.
Closes https://github.com/mongodb/mongo/pull/1437
Signed-off-by: Blake Oler <blake.oler@mongodb.com> and Billy Donahue <billy.donahue@mongodb.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Add deduction guides for unique_function
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
| |
This required plumbing unique_function into many more places.
|
| |
|
|
|
|
|
| |
Some MacOS headers `#define nil`, because of Objective-C[++]. Use,
instead, a name for the internal dummy argument that won't collide.
|
|
The `mongo::unique_function` object is a move-only function object
which is useful for capturing move-only lambdas (such as those
with `std::unique_ptr` objects) into type-erased function objects
that resemble `std::function`.
|