|
Boost : |
Subject: [boost] GSoC Proposal Preparation For Encoding Awared String
From: Anders Dalvander (boost_at_[hidden])
Date: 2011-03-28 15:18:53
On 20:59, Soares Chen wrote:
> Thanks for the link to Boost.Text! I think I missed it in the discussion I read.
You're welcome.
> Yes, indeed I think we all share similar ideas. Other than difference
> in design, I think the concept is quite similar to Chad's Unicode
> string library, though I don't know whether you two have seen each
> other's code.
I've reviewed Chad's library and his ideas of a Unicode string class
gave inspiration for my Unicode string class, although with different
design and intermediate goals.
> Basically, my concept is also something like adding one more template
> parameter to your basic_text class to generalize string_type. Other
> than that, you have pretty much demonstrated my motivation to build
> such a class.
Thank you. I'm happy if my class can give anyone an ounce of inspiration
or motivation.
> One simple question to ask: May I know why is your class holding
> shared_ptr<basic_string<>> as the private member instead of simply
> basic_string<>? If I'm not wrong, basic_string<> is already a smart
> pointer to the underlying buffer and most implementation offers handy
> COW semantics. Or is there a need to wrap basic_string<> in
> shared_ptr<> because not all basic_string<> implementation is
> efficient?
I did so to ensure that the data was shared between instances, as some
implementations does not use COW semantics. The basic_text class was
initially designed to be immutable, but I don't know if that is always
good. Now I think it would be better if instances could be appended at
the end, that way one could use Mathias Gaunard's Unicode library
without any intermediates.
> Thanks.
You're, once again, welcome.
Regards,
Anders Dalvander
-- WWFSMD?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk