Boost logo

Boost :

From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2019-12-05 14:18:49


czw., 5 gru 2019 o 15:11 Vinnie Falco <vinnie.falco_at_[hidden]> napisał(a):

> On Thu, Dec 5, 2019 at 6:07 AM Andrzej Krzemienski <akrzemi1_at_[hidden]>
> wrote:
> > I would like to know more. Given that fixed_string does not have
> operator+,
> > as well as the description above, I am inclined to think that it is not
> treated
> > as a string, but as a buffer of characters. Next question is, why is a
> vector
> > with fixed capacity not enough for this purpose? Do you ever have a need
> > to call `.find_first_not_of()` in your use cases?
>
> When dealing primarily with text based protocols: HTTP, URL, JSON,
> etc... you usually want to perform string operations. I agree that
> "drop-in replacement for std::string" is not a precise description for
> the purpose of the library, but it is partially correct. If you have
> code that currently uses std::string to perform calculations, and you
> want to impose a limit on the amount of data it can process while
> simultaneously avoiding memory allocations, a fixed_string is going to
> be easier to integrate than vector<char>.
>

Maybe we need a concept that would help draw the line clearly?

Regards,
&rzej;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk