1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-05-28 02:48:09 +08:00
Alex Miller 0ac868ad5d "Simplify" IndexedSet's insert and addMetric API.
The existing code tried to work around the complexities of optionally using
rvalue references' move capabilities if they exist.  As seen in the previous
MapPair, there's a combinatorial explosion of prototypes to declare as the
parameter length increases.  Because of this, addMetric ended up with a strange
API, and there was a wrapper to make a copy for insert.

Instead, we can apply the idiom of using universal/forwarding references and
std::forward to allow the compiler to instantiate the combinations that are
needed.  There's a TagData struct with no copy constructor that validates that
move constructors can be properly called still.

I measured a 12-byte difference between before and after this change, so no
template bloat was introduced.
2017-10-03 20:15:12 -07:00
..
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00
2017-05-25 13:48:44 -07:00