Commit c3440ba2 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Fix fbvector::swap impl

Summary:
[Folly] Fix `fbvector::swap` impl to do proper ADL.

Instead of passing template parameters, cast the arguments. That way non-template `swap` overloads can also be found.

Reviewed By: Gownta

Differential Revision: D9026136

fbshipit-source-id: 29240fed1c90d3556c2476917a21cbe1949c9a3c
parent 7acadf6e
...@@ -185,7 +185,7 @@ class fbvector { ...@@ -185,7 +185,7 @@ class fbvector {
static void swap(Impl& a, Impl& b) { static void swap(Impl& a, Impl& b) {
using std::swap; using std::swap;
if (!usingStdAllocator::value) { if (!usingStdAllocator::value) {
swap<Allocator>(a, b); swap(static_cast<Allocator&>(a), static_cast<Allocator&>(b));
} }
a.swapData(b); a.swapData(b);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment