Boost logo

Boost Users :

Subject: Re: [Boost-users] [mpl]... is there an mpl::string
From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2009-04-13 11:45:34


Eric Niebler wrote:
> Eric Niebler wrote:
>> Eric Niebler wrote:
>>> There's another consideration that I've been glossing over.
>>> mpl::string isn't *really* random access. Since
>>> mpl::string<'a','b','c'> designates the same character sequence as
>>> mpl::string<'abc'>, it takes O(N) template instantiations to find the
>>> N-th element in the sequence, at least in the current implementation.
>>> I'd like to fix that, but I don't know how (yet).
>>
>> Now this is really bothering me. The right thing to do is replace the
>> current implementation with one in which mpl::string is a front- and
>> back-extensible bidirectional sequence, and give up with the random
>> access pretense. :-(
>
> I've made this change. mpl::string is no longer random access (it never
> really was). Also, I've changed c_str to be a separate metafunction that
> works with any forward sequence.
>
> Thanks particularly to Noah Roberts for the good feedback.
>
No problem.

Now someone just needs to make format<> :P


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net