Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2019-12-04 23:03:55

On Wed, Dec 4, 2019 at 2:45 PM Gavin Lambert via Boost <
boost_at_[hidden]> wrote:

> On 5/12/2019 11:32, Emil Dotchevskit wrote:
> > - Operator+ should be provided. I'm not sure whether it should use
> > capacity N+M or something else, but all technical questions
> > notwithstanding, users ought to be able to concatenate strings
> easily, e.g.
> > if I want to add a "ms" to a number I shouldn't be jumping through
> hoops.
> Is there some reason why you consider operator+= insufficient for that
> purpose?

There are two use cases:

   1. The user knows he is working with fixed_string, and he chooses to
   call op+. There's no reason to take away this choice.

   2. The user has a generic function that concatenates "strings". We need
   good reasons if we want to force him to rewrite the function. It is
   possible that there could be some problem with op+, but at this point it
   seems mostly theoretical.

I presume the second case is rather rare.

Boost list run by bdawes at, gregod at, cpdaniel at, john at