Commit af863048 authored by Simon Capper's avatar Simon Capper Committed by Facebook GitHub Bot

Workaround compiler error with gcc version 5 &6

Summary: gcc versions 5 & 6 do not support template specializations outside the original namespace of the template even if the namespace is explicitly included in the template specialization.

Differential Revision: D24505812

fbshipit-source-id: 693e93de5bc5074866fdea713436a06d35762cb7
parent 05786142
...@@ -1528,8 +1528,9 @@ constexpr Range<wchar_t const*> operator"" _sp( ...@@ -1528,8 +1528,9 @@ constexpr Range<wchar_t const*> operator"" _sp(
// Avoid ambiguity in older fmt versions due to StringPiece's conversions. // Avoid ambiguity in older fmt versions due to StringPiece's conversions.
#if FMT_VERSION >= 70000 #if FMT_VERSION >= 70000
FMT_BEGIN_NAMESPACE
template <> template <>
struct fmt::formatter<folly::StringPiece> : private formatter<string_view> { struct formatter<folly::StringPiece> : private formatter<string_view> {
using formatter<string_view>::parse; using formatter<string_view>::parse;
template <typename Context> template <typename Context>
...@@ -1537,6 +1538,7 @@ struct fmt::formatter<folly::StringPiece> : private formatter<string_view> { ...@@ -1537,6 +1538,7 @@ struct fmt::formatter<folly::StringPiece> : private formatter<string_view> {
return formatter<string_view>::format({s.data(), s.size()}, ctx); return formatter<string_view>::format({s.data(), s.size()}, ctx);
} }
}; };
FMT_END_NAMESPACE
#endif #endif
FOLLY_POP_WARNING FOLLY_POP_WARNING
......
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