From: Arkady Shapkin Date: Thu, 19 Oct 2017 02:35:00 +0000 (-0700) Subject: Enable bug workaround also for MSVC 2017.4 X-Git-Tag: v2017.10.23.00~19 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=af6ddfa26c89acfd0c3eddfb0e86c30e45c88b06;hp=5b7fc789845937310f3a9952259bfa68448664cc;p=folly.git Enable bug workaround also for MSVC 2017.4 Summary: Workaround a bug in template instantiation in MSVC 2017 U3/4 with /permissive- https://developercommunity.visualstudio.com/content/problem/81223/incorrect-error-c5037-with-permissive.html /cc Orvid Closes https://github.com/facebook/folly/pull/691 Reviewed By: yfeldblum Differential Revision: D6085652 Pulled By: Orvid fbshipit-source-id: f068dc3f8e474163815fc497b05410fe76834a52 --- diff --git a/folly/stats/Histogram.h b/folly/stats/Histogram.h index 06db3d04..1f34d0e9 100644 --- a/folly/stats/Histogram.h +++ b/folly/stats/Histogram.h @@ -480,12 +480,13 @@ class Histogram { } // namespace folly -// MSVC 2017 Update 3 has an issue with explicitly instantiating templated +// MSVC 2017 Update 3/4 has an issue with explicitly instantiating templated // functions with default arguments inside templated classes when compiled // with /permissive- (the default for the CMake build), so we directly include // the -defs as if it were -inl, and don't provide the explicit instantiations. // https://developercommunity.visualstudio.com/content/problem/81223/incorrect-error-c5037-with-permissive.html -#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER < 191125542 +#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && \ + _MSC_FULL_VER <= 191125547 #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 1 #else #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 0