From 27fab5cd94531dde1ffd71cd80a5459925d4096c Mon Sep 17 00:00:00 2001 From: Orvid King Date: Wed, 12 Aug 2015 12:45:01 -0700 Subject: [PATCH] Explicitly exclude StringPiece from FormatValue in trace.h Summary: For some reason, MSVC seems to have decided that StringPiece is able to match the constraint, and thus complains that multiple template instantiations could be valid. This explicitly checks that `Val` is not `StringPiece`, which is good enough to solve the problem. Closes https://github.com/facebook/hhvm/pull/5801 Reviewed By: @mxw Differential Revision: D2282477 --- hphp/util/trace.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hphp/util/trace.h b/hphp/util/trace.h index 4b45f99448b..16448a69823 100644 --- a/hphp/util/trace.h +++ b/hphp/util/trace.h @@ -445,7 +445,11 @@ namespace folly { template struct FormatValue::value, + HPHP::has_toString::value && + // This is here because MSVC decides that StringPiece matches + // both this overload as well as the FormatValue overload for + // string-y types in folly itself. + !std::is_same::value, void >::type> { explicit FormatValue(const Val& val) : m_val(val) {} -- 2.11.4.GIT