From: Christopher Dykes Date: Tue, 2 May 2017 21:21:15 +0000 (-0700) Subject: Fix FBString in MSVC 2015 X-Git-Tag: v2017.05.08.00~22 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5e8852c8bcd1a45ddb4daada12b34a78e3940873;p=folly.git Fix FBString in MSVC 2015 Summary: MSVC 2015 Update 3 is even worse in this particular case, and requires it to be explicitly referenced as being within the `folly` namespace >_>... Reviewed By: ot, yfeldblum Differential Revision: D4988025 fbshipit-source-id: dea311dd42f40b442951b8df3c5f68cf70d13769 --- diff --git a/folly/FBString.h b/folly/FBString.h index c10490ab..f5b577a7 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -1238,11 +1238,14 @@ public: // otherwise MSVC 2017 will aggressively pre-resolve value_type to // traits_type::char_type, which won't compare as equal when determining // which overload the implementation is referring to. + // Also note that MSVC 2015 Update 3 requires us to explicitly specify the + // namespace in-which to search for basic_fbstring, otherwise it tries to + // look for basic_fbstring::basic_fbstring, which is just plain wrong. template typename std::enable_if< std::is_same< typename std::decay::type, - typename basic_fbstring::value_type>::value, + typename folly::basic_fbstring::value_type>::value, basic_fbstring&>::type operator=(TP c);