Previous section   Next section

Imperfect C++ Practical Solutions for Real-Life Programming
By Matthew Wilson
Table of Contents
Chapter 25.  Fast, Non-intrusive String Concatenation


25.6. Standardization

Since this technique brings only benefits, you may wonder whether it should be adopted as a standard mechanism. Not being a member of the standards committee, I cannot answer that, and it may be that there are ramifications precluding its adoption that I've not thought of. (The only thing I have been able to come up with is that one would not be able to declare pointers to functions such as S (*)(S const &, S const &) and assign to them the address of std::operator +(). I can't imagine any reason why anyone would do that, so it doesn't seem particularly dissuasive.)

Naturally it would be great if this mechanism were adopted, and I'm currently talking with compiler and library vendors to get their feedback; at least one vendor is keen so far. It's possible that you'll see fast_string_concatenator in a library near you in the future!

Whether that happens or not, though, there's no reason why you can't use it in your own string libraries, or apply it nonintrusively in your own client code, and take advantage of the performance improvements it confers.


      Previous section   Next section