Move swap() under base namespace
This is needed because of how argument-dependent lookup works (it looks in the namespace of the type for an unqualified function name). According to go/using-std-swap, the recommended usage pattern is: using std::swap; swap(thing1, thing2); Having swap outside of base namespace wouldn't work with this recommendation as slower std::swap would be silently used instead. Bug: 1073933 Change-Id: Ib4485b51ba52ad491306bec9b4402a154adae16c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2167796 Auto-Submit: Bartek Nowierski <bartekn@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by:Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#763350}
Showing
Please register or sign in to comment