This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ not conforming with --enable-concepts-check?
On Thu, Sep 23, 2004 at 11:02:33AM +0200, Paolo Carlini wrote:
> >14.5(2) and other clauses talk about default arguments in template
> >functions, but I'm not really sure what it means by "default arguments
> >... are considered definitions"
> >
> >
> Maybe related to the ODR (One-Definition Rule)?
Ah, yes - that makes sense, thanks.
> >If it turns out we're violating the standard in this respect, could we
> >make _M_fill_initialized()'s second parameter default to value_type(),
> >so we can use it like this:
> >
> > deque(size_type n)
> > { _M_fill_initialized(n); }
> >
> >It might be possible to move all occurrences of default-ctor calls to
> >default args (I think this is an case where "implementations go to a
> >great deal of effort to make sure that they don't require it by accident"
> >as Matt Austern said.)
> >
> >I don't know if that's desirable though, and the v3 behaviour might be
> >OK by the standard anyway.
> >
> >
> I think that working on this is *definitely* desirable. In the
> meanwhile Martin
> (Sebor) told me that, basically (sorry Martin if I'm miss-citing you
> somehow!), even
> if the standard doesn't say much about explicit instantiations (see also
> your point
> above) as a matter of Quality of Implementation, we should definitely
> improve
> this behavior (the same maintains Matt, indeed)
Yes, since it's possible to allow those explicit instantiations we
should do so really.
> Can I assume that you are going to experiment with your suggestion above? It
> would involve also adding testcases (explicit instantiation of each
> container with
> a non DefaultConstructible type) and, of course, checking a little that
> performance
> are not affected.
Yes, I'll play with that idea (starting with deque, just because
it's where I noticed it) and report how I get on.
(I haven't solved the linker errors I was getting the other day yet,
have bootstrapped again but not tested - had to watch Empire Strikes
Back last night :)
more data soon...
jon
--
"The following story is true. By which I mean false. It's all lies.
But they're entertaining lies. And in the end, isn't that the real truth.
The answer, is no."
- Leonard Nimoy, in "The Simpsons"