Displaying 4 results from an estimated 4 matches for "twinestring2".
Did you mean:
twinestring
2011 Jul 24
0
[LLVMdev] Correct use of StringRef and Twine
...eral outline
makes sense: Introduce an extra type that's Twine-esque, but is only
the top level (so it's implicitly constructible from a const Twine&),
rather than all the branches of a Twine. If a function wants to accept
a Twine that it needs to manipulate, it can mark its argument as
TwineString2 (for want of a better name, just using 2 to distinguish
from the (1) example). TwineString2 has a buffer in it, but it starts
uninitialized. Any attempt to retrieve/inspect values causes the
string to be initialized. [downside: all string operations on a
TwineString2 incur an "if not initializ...
2011 Jul 24
2
[LLVMdev] Correct use of StringRef and Twine
...ense: Introduce an extra type that's Twine-esque, but is only
> the top level (so it's implicitly constructible from a const Twine&),
> rather than all the branches of a Twine. If a function wants to accept
> a Twine that it needs to manipulate, it can mark its argument as
> TwineString2 (for want of a better name, just using 2 to distinguish
> from the (1) example). TwineString2 has a buffer in it, but it starts
> uninitialized. Any attempt to retrieve/inspect values causes the
> string to be initialized. [downside: all string operations on a
> TwineString2 incur an &q...
2011 Jul 23
2
[LLVMdev] Correct use of StringRef and Twine
On Jul 22, 2011, at 2:59 PM, David Blaikie wrote:
>> The dangerous part of this is that characters are integers, so "foo" + 'x' is very likely to cause serious problems.
>
> std::string already provides such overloads though, doesn't it? So the
> code isn't any safer from accidental "foo" + 'x' expressions that
> don't include
2011 Jul 25
0
[LLVMdev] Correct use of StringRef and Twine
...an extra type that's Twine-esque, but is only
>> the top level (so it's implicitly constructible from a const Twine&),
>> rather than all the branches of a Twine. If a function wants to accept
>> a Twine that it needs to manipulate, it can mark its argument as
>> TwineString2 (for want of a better name, just using 2 to distinguish
>> from the (1) example). TwineString2 has a buffer in it, but it starts
>> uninitialized. Any attempt to retrieve/inspect values causes the
>> string to be initialized. [downside: all string operations on a
>> TwineStr...