From: Christopher Dykes Date: Mon, 20 Nov 2017 21:44:02 +0000 (-0800) Subject: Work around a bug in MSVC name lookup within templated friend contexts X-Git-Tag: v2017.11.27.00~14 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=f5edd7dcaf8308a946d3843940e2f7a5f40ca44f;ds=sidebyside Work around a bug in MSVC name lookup within templated friend contexts Summary: MSVC has a bug that causes it to think that `once_flag` in this context resolves to the `using` statement further up, rather than `detail::once_flag`. Reviewed By: yfeldblum Differential Revision: D6376501 fbshipit-source-id: 481dbd75ed21f3d519bd920258fa743f314668ad --- diff --git a/folly/synchronization/CallOnce.h b/folly/synchronization/CallOnce.h index 4d4bf0f4..51543ea2 100644 --- a/folly/synchronization/CallOnce.h +++ b/folly/synchronization/CallOnce.h @@ -83,12 +83,12 @@ class once_flag { template friend void ::folly::call_once( - once_flag& flag, + detail::once_flag& flag, Callable&& f, Args&&... args); template friend void call_once_impl_no_inline( - once_flag& flag, + detail::once_flag& flag, Callable&& f, Args&&... args);