On Tue, Mar 12, 2002 at 10:41:37AM +0100, Lars Gullik Bjønnes wrote: > I really do belive that the drawback with a cstring is a lot larger > than the drawbacks of string. cstring cannot store '\0', assignment is > always O(n) if you use dynamic allocation, it does not play well with > std::string.
Ok, maybe I did not make the point clear enough. cstring should only be used when data is static, so copy is O(1) since it has to copy the pointer, not the data. I see no easy way to enforce this by the compiler, but e.g. std::valarray behaves similarly. > bull... > > I use C++ as syntactic sugar... Oh yes. And you buy everybody one of these 2GHz machines just to compile and run LyX. > with cstring you have an allocation problem, either you need to have a > static size, or you have to dynamically allocate the memory. See above. Andre' -- André Pönitz .............................................. [EMAIL PROTECTED]