Is there an equivalent to the blitz++ library for strings (i.e. a library which improves performance of string construction/manipulation by delaying string building until the whole expression is read)?
Blitz++ improves the speed of matrix/vector operations by template metaprogramming, constructing a "syntax tree" at compile time from expressions like A + B + C and then evaluating the syntax tree. This method could, for example, improve the performance of string concatenation, since after having seen an expression like s1 + s2 + s3, the size of the result will be known, such that then memory allocation and copying can be done in one step, rather than first allocating memory for s1 + s2, copying, allocating memory for (s1 + s2) + s3, and then copying again.