[cfe-dev] Interest in StringRef'ize APIs Open Project
chisophugis at gmail.com
Tue May 19 14:28:09 PDT 2015
On Tue, May 19, 2015 at 9:56 AM, Renato Golin <renato.golin at linaro.org>
> On 19 May 2015 at 17:49, David Chisnall <David.Chisnall at cl.cam.ac.uk>
> > 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.
A related problem is foo(...,T* Elems, int NElem,...) ->
I think we've been pretty good about this lately, but that transformation
is highly mechanical and there are probably a fair number of cases
-- Sean Silva
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev