Commit e6aa2684 authored by Eric Niebler's avatar Eric Niebler Committed by Facebook Github Bot 3

gcc-4.8 is not decaying types correctly in lambda init captures. Help it out....

gcc-4.8 is not decaying types correctly in lambda init captures. Help it out. Fixes open source build.

Summary: Trivial change gets folly::ThreadLocal building again with gcc-4.8, needed by the Open Source build.

Reviewed By: chadparry, yfeldblum

Differential Revision: D3498657

fbshipit-source-id: cf36f2bef7f1d03d133d16bfd063f7a2ce681822
parent 235fb4c0
...@@ -107,10 +107,11 @@ struct ElementWrapper { ...@@ -107,10 +107,11 @@ struct ElementWrapper {
DCHECK(deleter2 == nullptr); DCHECK(deleter2 == nullptr);
if (p) { if (p) {
ptr = p; ptr = p;
deleter2 = new std::function<DeleterFunType>([d = d]( auto d2 = d; // gcc-4.8 doesn't decay types correctly in lambda captures
void* pt, TLPDestructionMode mode) { deleter2 = new std::function<DeleterFunType>(
d(static_cast<Ptr>(pt), mode); [d2](void* pt, TLPDestructionMode mode) {
}); d2(static_cast<Ptr>(pt), mode);
});
ownsDeleter = true; ownsDeleter = true;
guard.dismiss(); guard.dismiss();
} }
......
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