All,

Does anyone have an implementation of STLStringResizeUninitialized
(see stl_util-inl.h) for gcc version 4.3.2?

The inability to use std::string as a zero-copy buffer has been a
long-running annoyance of mine, and I'm really excited by the
string_as_array function provided in stl_util-inl.h.  Unfortunately,
it isn't worth as much without STLStringResizeUninitialized, since you
still end-up zero-filling the array (via resize) before writing into
it.

I understand why Google wouldn't want to include their version by
default, as until the standard catches up it will by necessity be an
ugly hack, but it would be great to have an implementation for my own
use.

As far as I can tell, vector<char> suffers from the same problem (no
way to resize without zero-filling the array).

Sean
-- 
"I refuse to accept the idea that the ‘isness’ of man’s present nature
makes him morally incapable of reaching up for the eternal ‘oughtness’
that forever confronts him." --MLK

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to