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

Fix test failure introduced by D24505812

Summary:
D24542292 fixed a problem introduced by D24505812 (https://github.com/facebook/folly/commit/af8630489dc8318f72d18358591bc3fa0be304ff) with gcc version 6.

Unfortunately this broke some python code generation.

I didn't fully root cause the issue but it appears that the macro expansion of FMT_BEGIN_NAMESPACE is inconsistent.

The original diff D24505812 (https://github.com/facebook/folly/commit/af8630489dc8318f72d18358591bc3fa0be304ff) hardcoded the fmt namespace I changed it to what the fmt lib used when declaring the formatter template.

Reverting the change to use the macro back to hardcoding the fmt namespace fixes the test and still works around the gcc 6 compler problem.

Reviewed By: vitaut

Differential Revision: D24542292

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