[cfe-dev] Interest in StringRef'ize APIs Open Project
renato.golin at linaro.org
Tue May 19 09:56:43 PDT 2015
On 19 May 2015 at 17:49, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
> Going from std::string to StringRef involves going from an explicit copy to something with nontrivial ownership semantics. The converse transform would be trivial (it’s always safe to use a std::string instead of a StringRef, you’re just going to end up with lots of redundant copies), but going in this direction requires reasoning about the surrounding code.
The idea is to go from std::string to StringRef/Twine, not the other
way around, so the problems are usually non-trivial.
More information about the cfe-dev