Add a formatter for folly::StringPiece

This commit is contained in:
Victor Zverovich
2018-07-14 07:31:47 -07:00
parent ae4a3945f5
commit e0f6a2f8be
5 changed files with 56 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
// A folly::StringPiece stub.
#include <cstring>
namespace folly {
class StringPiece {
public:
explicit StringPiece(const char *s) : data_(s), size_(std::strlen(s)) {}
const char* data() const { return "foo"; }
size_t size() const { return 3; }
private:
const char *data_;
size_t size_;
};
}