Commit 24c892da authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Fix FBString under MSVC

Summary: MSVC requires the declaration to match a bit closer than GCC does.

Reviewed By: yfeldblum, ot

Differential Revision: D4981404

fbshipit-source-id: 92ee40c40f66725c09a3087e49d99ebae222c2f2
parent 2642bd3d
...@@ -1234,10 +1234,16 @@ public: ...@@ -1234,10 +1234,16 @@ public:
// value_type overload is dangerous, so we're explicitly deleting // value_type overload is dangerous, so we're explicitly deleting
// any overloads of operator= that could implicitly convert to // any overloads of operator= that could implicitly convert to
// value_type. // value_type.
// Note that we do need to explicitly specify the template types because
// 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.
template <typename TP> template <typename TP>
typename std::enable_if< typename std::enable_if<
std::is_same<typename std::decay<TP>::type, value_type>::value, std::is_same<
basic_fbstring&>::type typename std::decay<TP>::type,
typename basic_fbstring<E, T, A, Storage>::value_type>::value,
basic_fbstring<E, T, A, Storage>&>::type
operator=(TP c); operator=(TP c);
basic_fbstring& operator=(std::initializer_list<value_type> il) { basic_fbstring& operator=(std::initializer_list<value_type> il) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment