On Mon, Jul 24, 2023 at 5:19 PM Charles Hong <[email protected]> wrote:
> Hello, > Is there a way to directly allocate a RepeatedPtrField with n empty > pointers? I know that there is a Reserve() function, but that doesn't > change the current_size variable. I am wondering why there is no "Resize()" > function for RepeatedPtrField (not RepeatedField), similar to std::resize > for a vector. > Currently, there isn't a Resize, no. We are working on adding a more STL interface to these types, so a `resize` like the one in `std::vector` will exist in the future. > > Best, > Charles > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/protobuf/caea2f12-ffe5-477d-a0cf-daaebefe60edn%40googlegroups.com > <https://groups.google.com/d/msgid/protobuf/caea2f12-ffe5-477d-a0cf-daaebefe60edn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/CAM9aRsL1CiCsS%2Bb%3DcB88xVJh6NrP%3DQKofc-gquC5Tacx8hHq_w%40mail.gmail.com.
