Don't use the plus operator unecessarily
authorChristopher Dykes <cdykes@fb.com>
Sat, 2 Apr 2016 00:56:17 +0000 (17:56 -0700)
committerFacebook Github Bot 1 <facebook-github-bot-1-bot@fb.com>
Sat, 2 Apr 2016 01:05:24 +0000 (18:05 -0700)
Summary: MSVC doesn't like this and complains about ambigious overloads.

Reviewed By: ericniebler

Differential Revision: D3107438

fb-gh-sync-id: 597ba85fdb7640b0a0fda352bf53ce31cf0e38b7
fbshipit-source-id: 597ba85fdb7640b0a0fda352bf53ce31cf0e38b7

folly/detail/ThreadLocalDetail.h

index 23c566f09812784d2d1103b52acef7a6b99dfbc4..1fa4844d3655bd1c4669738a75896dd84347f5a1 100644 (file)
@@ -85,8 +85,9 @@ struct ElementWrapper {
 
     if (p) {
       ptr = p;
-      deleter1 =
-          +[](void* pt, TLPDestructionMode) { delete static_cast<Ptr>(pt); };
+      deleter1 = [](void* pt, TLPDestructionMode) {
+        delete static_cast<Ptr>(pt);
+      };
       ownsDeleter = false;
     }
   }