This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: string fix & mystery
On Fri, Apr 21, 2000 at 12:13:01PM -0700, Chip Salzenberg wrote:
> According to ncm@cantrip.org:
> > The mystery is, why does the compiler not report the bug?
>
> > #ifdef CONSC
> > template
> > C*
> > - S::_S_construct<S::iterator>
> > - (S::size_type, C, const allocator<C>&);
> > + S::_S_construct(S::size_type, C, S::allocator_type const&);
> > #endif
>
> Well, because there's no compiler-visible bug. Apparently,
> allocator_type happens to be allocator<C> in all of our actual
> usages of basic_string.
That's not the mystery. The interesting bug was that the
spurious "S:iterator" template argument wasn't noticed.
That particular overload of S::_S_construct isn't a template.
Nathan Myers
ncm at cantrip dot org