Add support for StringRef in BasicFormatter.
This commit is contained in:
@@ -862,6 +862,11 @@ class BasicFormatter {
|
||||
string.size = value.size();
|
||||
}
|
||||
|
||||
Arg(StringRef value) : type(STRING), formatter(0) {
|
||||
string.value = value.c_str();
|
||||
string.size = value.size();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Arg(const T &value) : type(CUSTOM), formatter(0) {
|
||||
custom.value = &value;
|
||||
|
||||
Reference in New Issue
Block a user