irishrover wrote:

> ```c++
> std::string getArcana(const TemplateName &NNS) { 
> return std::string{""}; // no warning, explicit ctor call
> return std::string(""); // no warning
> }
> ```

It works even w/o options. Just wrap literal with ``std::string(...)`` or 
``std::string{}``. Pls, see the tests:

```c++
std::string explicitConstructionEmpty() {
  return std::string("");
}

std::string explicitConstructionWithInitListEmpty() {
  return std::string{""};
}
```

https://github.com/llvm/llvm-project/pull/172170
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to