Why does FormatTime() use absl::string_view as "format" string instead of a constexpr?
未關閉
question
- 主要語言
- C++
- 星號
- 18.1k
- 分支
- 3.2k
- 平均合併
- 20 小時 36 分鐘
- 30 天內合併 PR
- 1
描述
The [FormatTime()](https://github.com/abseil/abseil-cpp/blob/master/absl/time/time.h#L1307) API is:
```
std::string FormatTime(absl::string_view format, Time t, TimeZone tz);
```
The `format` argument is generally a `constexpr`, as in [StrFormat()](https://github.com/abseil/abseil-cpp/blob/master/absl/strings/str_format.h#L338)
Can anyone explain why `FormatTime()` accepts a `absl::string_view` as the `format` string instead of a `constexpr`?
貢獻指南
評估
這個 Issue 還沒有評估資料。