This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] min/max testcase improvements


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]