<functional> Implement bind_front()#158
Conversation
StephanTLavavej
left a comment
There was a problem hiding this comment.
- You need to mention the new feature in
yvals_core.hin the_HAS_CXX20section in sorted order. We use the corresponding issue title, so it should be listed asP0356R5 bind_front(). - You need to update
_MSVC_STL_UPDATEinyvals_core.hwhen adding a new feature, since it's a new month. - You also need to define the feature-test macro
__cpp_lib_bind_frontinyvals_core.h. - This should indeed be
constexpr.
Excellent use of _NODISCARD - bind_front() should never be discarded (why call it?) but operator() can easily be discarded if the bound functor has useful side effects.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ad483de to
94fcc92
Compare
StephanTLavavej
left a comment
There was a problem hiding this comment.
I believe that this will be ready to be checked in after these last remaining issues are fixed. Thanks!
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
StephanTLavavej
left a comment
There was a problem hiding this comment.
I believe that this is sufficiently clear now, although clang-format varies the wrapping a little (due to varying line lengths). At this point I believe there is no need for more wrapping as the repetitive structure is scannable enough.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
CaseyCarter
left a comment
There was a problem hiding this comment.
Approved assuming test coverage.
|
While writing tests, I observe that WG21-P1651 claims "functors produced by |
|
@StephanTLavavej Ok! Though, let me know if you'd rather have me explicitly put |
|
Status update: I've sent out that Microsoft-internal PR with tests, so I should be able to merge this and the other PRs tomorrow. |
Description
This is an implementation of
std::bind_front(). Addresses issue #13Checklist
community PRs will be delayed until the test and CI systems are online.
C++ Working Draft.
_Uglyas perhttps://eel.is/c++draft/lex.name#3.1 .
verified by an STL maintainer before CI is online, leave this unchecked for
initial submission).
members, adding virtual functions, changing whether a type is an aggregate
or trivially copyable, etc.).
the C++ Working Draft as a reference (and any other cited standards).
If they were derived from a project that's already listed in NOTICE.txt,
that's fine, but please mention it. If they were derived from any other
project (including Boost and libc++, which are not yet listed in
NOTICE.txt), you must mention it here, so we can determine whether the
license is compatible and what else needs to be done.