Boost logo

Boost :

From: Andrei Alexandrescu \(See Website for Email\) (andrewalex_at_[hidden])
Date: 2004-06-05 14:20:47


"Hartmut Kaiser" <hartmutkaiser_at_[hidden]> wrote in message
news:1BWfiC-1whMxs0_at_afwd00.sul.t-online.com...
>
> Reece Dunn wrote:
>
> > I am implementing test cases to validate the implementation
> > of my fixed_string class and basic_string_impl (based on
> > flex_string) and noticed a defect in the implementation of:
> >
> > template< typename InputIterator >
> > inline string_type & replace( iterator i1, iterator i2,
> > InputIterator j1, InputIterator j2 );
> >
> > It handles the Integral case fine, but when the
> > InputIterators are actually iterators, it asserts false,
> > where the standard dictates it returns:
> >
> > replace( i1, i2, basic_string( j1, j2 ));
> >
> > or equivalent behaviour, e.g. in the implementation I'm using:
> >
> > replace( i1, i2, std::distance( j1, j2 ), char_type());
> > std::copy( j1, j2, i1 );
> >
> > Is there any specific reason for this, or is it an implementation bug?
>
> It's simply not implemented yet, I guess. Andrei (Alexandrescu) inserted
an
> assertion to draw the attention of the user to this fact. You may contact
> him directly, maybe it's implemented already (the flex_string version
> contained in Wave is a bit dated).

I don't have much time to browse boost's newsgroup nowadays, but I saw this
post by chance. Could you please take a look at
http://moderncppdesign.com/code and see how that implementation of
flex_string works? Thanks!

Andrei


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk