This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Implement Any::has_value
ClosedPublic

Authored by kazu on Aug 19 2022, 9:29 PM.

Details

Summary

This patch implements Any::has_value for consistency with std::any in
C++17.

My plan is to deprecate Any::hasValue after migrating all of its uses
to Any::has_value. Since I am about to do so, this patch simply
replaces hasValue with has_value in the unit test instead of adding
tests for has_value.

Diff Detail

Event Timeline

kazu created this revision.Aug 19 2022, 9:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2022, 9:29 PM
kazu requested review of this revision.Aug 19 2022, 9:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2022, 9:29 PM
dblaikie accepted this revision.Aug 20 2022, 1:18 AM

Sounds good, thanks!

This revision is now accepted and ready to land.Aug 20 2022, 1:18 AM
This revision was automatically updated to reflect the committed changes.