Open jiawen opened 11 months ago
If someone comes up with a patch to this that doesn't break existing code, then I will consider accepting it, but as you said, the workaround is so trivial that I don't think anyone is going to spend time looking into this.
Describe the issue
When defining a flag of
std::string
type, the default value must be anstd::string
orconst char*
. It would be great ifstd::string_view
were also accepted.Following Google conventions, I frequently have string constants in the form:
which I tend to prefer over
constexpr const char*
becausestd::string_view
has aconstexpr
constructor that allows explicit zeroes in strings.Steps to reproduce the problem
The following does not compile:
Of course, I can work around this with:
What version of Abseil are you using?
Pinned to commit 74eee2aff683cc7dcd2dbaa69b2c654596d8024e
What operating system and version are you using?
MacOS Ventura 13.5.2
What compiler and version are you using?
What build system are you using?
bazel 6.1.1
Additional context
No response