> > Newline between functions please.
> >
> > OK with those two changes.
> 
> Looking back through my inbox, this one doesn't seem to have been
> pushed. Was it superseded by something else, or is it just waiting for
> stage 1 now?

Seems I missed the approval, sorry.  I will push it - I think it would
be useful to have it in.
(I have more libstdc++ work for next stage1, but solving this is IMO
useful)

Honza
> 
> 
> >
> >
> > > +  // Length of string constructed is easier to propagate 
> > > inter-procedurally
> > > +  // than difference between iterators.
> > > +  template<typename _CharT, typename _Traits, typename _Alloc>
> > > +     template<bool _Terminated>
> > > +    _GLIBCXX20_CONSTEXPR inline
> >
> > The 'inline' here is not redundant, so keep this one.
> >
> > > +    void
> > > +    basic_string<_CharT, _Traits, _Alloc>::
> > > +    _M_construct(const _CharT *__str, size_type __n)
> > > +    {
> > > +      if (__n > size_type(_S_local_capacity))
> > > +       {
> > > +         _M_data(_M_create(__n, size_type(0)));
> > > +         _M_capacity(__n);
> > > +       }
> > > +      else
> > > +       _M_init_local_buf();
> > > +
> > > +      if (__n || _Terminated)
> > > +       this->_S_copy(_M_data(), __str, __n + _Terminated);
> > > +
> > > +      _M_length(__n);
> > > +      if (!_Terminated)
> > > +       traits_type::assign(_M_data()[__n], _CharT());
> > > +    }
> > >
> > >    template<typename _CharT, typename _Traits, typename _Alloc>
> > >      _GLIBCXX20_CONSTEXPR
> > > diff --git a/libstdc++-v3/src/c++11/string-inst.cc 
> > > b/libstdc++-v3/src/c++11/string-inst.cc
> > > index ec5ba41ebcd..4be626806bf 100644
> > > --- a/libstdc++-v3/src/c++11/string-inst.cc
> > > +++ b/libstdc++-v3/src/c++11/string-inst.cc
> > > @@ -91,6 +91,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> > >      void
> > >      S::_M_construct(const C*, const C*, forward_iterator_tag);
> > >
> > > +  template
> > > +    void
> > > +    S::_M_construct<false>(const C*, size_t);
> > > +
> > > +  template
> > > +    void
> > > +    S::_M_construct<true>(const C*, size_t);
> > > +
> > >  #else // !_GLIBCXX_USE_CXX11_ABI
> > >
> > >    template
> > >
> 

Reply via email to