This is an archive of the discontinued LLVM Phabricator instance.

[STLExtras] Add a default value to drop_begin
ClosedPublic

Authored by kazu on Jan 15 2021, 10:13 PM.

Details

Summary

This patch adds the default value of 1 to drop_begin.

In the llvm codebase, 70% of calls to drop_begin have 1 as the second
argument. The interface similar to with std::next should improve
readability.

This patch converts a couple of calls to drop_begin as examples.

Diff Detail

Event Timeline

kazu created this revision.Jan 15 2021, 10:13 PM
kazu requested review of this revision.Jan 15 2021, 10:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2021, 10:13 PM
dblaikie accepted this revision.Jan 17 2021, 10:50 AM

Sounds good, thanks!

This revision is now accepted and ready to land.Jan 17 2021, 10:50 AM
This revision was landed with ongoing or failed builds.Jan 18 2021, 10:17 AM
This revision was automatically updated to reflect the committed changes.