From: Christopher Dykes Date: Fri, 18 Nov 2016 00:30:31 +0000 (-0800) Subject: Don't rely on implicit lookup of member names in dependent base classes X-Git-Tag: v2016.11.21.00~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=be0254f343c83fd05fb5efefd9894821f59e1c77;p=folly.git Don't rely on implicit lookup of member names in dependent base classes Summary: The standard says this shouldn't be done, but GCC, Clang, and MSVC all do, at least, MSVC does if you don't pass the `/permissive-` switch to disable this non-compliant lookup. This just qualifies it with `this->` which solves the problem. MSVC plans to eventually (some time after the 2017 release) enable `/permissive-` by default, so let's start compiling with it now. Reviewed By: yfeldblum Differential Revision: D4200725 fbshipit-source-id: 8545c6bcda9ba6006733c15f668805cb1260517a --- diff --git a/folly/test/DeterministicSchedule.cpp b/folly/test/DeterministicSchedule.cpp index bea4d068..dcaac743 100644 --- a/folly/test/DeterministicSchedule.cpp +++ b/folly/test/DeterministicSchedule.cpp @@ -302,7 +302,7 @@ FutexResult Futex::futexWaitImpl( << ", .., " << std::hex << waitMask << ") beginning.."); futexLock.lock(); - if (data == expected) { + if (this->data == expected) { auto& queue = futexQueues[this]; queue.emplace_back(waitMask, &awoken); auto ours = queue.end();