This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Factor duplicate code into function templates
ClosedPublic

Authored by ldionne on Jul 25 2018, 11:16 AM.

Details

Summary

The exact same code was replicated 11 times for implementing the basic_istream
input operators (those that don't use numeric_limits). The same code was also
duplicated twice for implementing the basic_istream input operators that take
numeric_limits into account.

This commit factors the common code into function templates to avoid
the duplication.

Diff Detail

Repository
rCXX libc++

Event Timeline

ldionne created this revision.Jul 25 2018, 11:16 AM
dexonsmith accepted this revision.Jul 25 2018, 11:46 AM

Nice cleanup! LGTM.

This revision is now accepted and ready to land.Jul 25 2018, 11:46 AM
This revision was automatically updated to reflect the committed changes.