[PATCH] min/max testcase improvements
Nathan Myers
ncm-nospam@cantrip.org
Tue Feb 4 23:51:00 GMT 2003
On Tue, Feb 04, 2003 at 05:13:23PM -0600, Benjamin Kosnik wrote:
>
> This doesn't link, due to missing definitions for the A::a member. I
> believe this style of definition is only allowed for static const
> integral members. Fixing this is simple, and with that, this testcase
> passes.
I remember now that the A::a member was left out deliberately to
expose quality-of-implementation lossage. There's no reason for
the compiler to demand a referenceable object when the function
it's passing the reference to is inline, and even less reason
for the code to actually reference the object. (Yes, the compiler
is allowed to demand it, but it's also allowed to demand manual
instantiations of all templates. That doesn't make it right.)
I believe this behavior -- demanding an explicit definition of
static const integral members -- is on the list to be eliminated
in the next standard iteration.
Nathan Myers
ncm-nospam@cantrip.org
More information about the Libstdc++
mailing list