This is an archive of the discontinued LLVM Phabricator instance.

[STLExtras] Add append_range helper.
ClosedPublic

Authored by silvas on Nov 5 2020, 4:00 PM.

Details

Summary

This is convenient in a lot of cases, such as when the thing you want
to append is someReallyLongFunctionName() that you'd rather not
write twice or assign to a variable for the paired begin/end calls.

Diff Detail

Event Timeline

silvas created this revision.Nov 5 2020, 4:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 5 2020, 4:00 PM
silvas requested review of this revision.Nov 5 2020, 4:00 PM
silvas edited the summary of this revision. (Show Details)
silvas added reviewers: rnk, dblaikie, mehdi_amini, rriddle.

I initially called this append, but that seemed to conflict with a function elsewhere in the codebase. It seems like map_range is probably making a similar decision to avoid a function with as generic a name as map.

dblaikie accepted this revision.Nov 5 2020, 4:08 PM

Looks good!

This revision is now accepted and ready to land.Nov 5 2020, 4:08 PM
This revision was landed with ongoing or failed builds.Nov 5 2020, 4:20 PM
This revision was automatically updated to reflect the committed changes.