This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Make `llvm::identity` a transparent function object
ClosedPublic

Authored by jloser on Aug 24 2022, 6:37 PM.

Details

Summary

llvm::identity is similar to std::identity from C++20, but one surprising
thing is that llvm::identity is not a transparent function object. Add the
is_transparent type alias to denote it can be used as a transparent function
object.

Diff Detail

Event Timeline

jloser created this revision.Aug 24 2022, 6:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2022, 6:37 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
jloser requested review of this revision.Aug 24 2022, 6:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2022, 6:37 PM
dblaikie accepted this revision.Aug 24 2022, 11:57 PM

Sounds good

This revision is now accepted and ready to land.Aug 24 2022, 11:57 PM
This revision was automatically updated to reflect the committed changes.