Add a formatter for folly::StringPiece

This commit is contained in:
Victor Zverovich committed 2018-07-14 07:31:47 -07:00
1 parent ae4a3945f5
commit e0f6a2f8be
5 files changed
+56 -2

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
// Formatting library for C++ - folly::StringPiece formatter
//
// Copyright (c) 2012 - present, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.
#ifndef FMT_FOLLY_H_
#define FMT_FOLLY_H_
#include <folly/Range.h>
#include "core.h"
FMT_BEGIN_NAMESPACE
template <typename Ctx>
inline internal::typed_value<Ctx, internal::string_type>
make_value(folly::StringPiece s) {
return string_view(s.data(), s.size());
}
FMT_END_NAMESPACE
#endif // FMT_FOLLY_H_