This is the mail archive of the mailing list for the libstdc++ project. See the libstdc++ home page for more information.

[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: Static data members in template declarations

Let's make it work.

------- Start of forwarded message -------
From: (John H. Spicer)
Subject: Re: Template member matching
Date: 9 Nov 1998 07:09:55 -0800
Message-ID: <>

To: C++ core language mailing list
Message c++std-core-7889

In Message c++std-core-7888, Jason Merrill writes:
> Is this well-formed?
>   template <class T> 
>   struct S { 
>     enum E { a };
>     static T t[a];
>   };
>   template <class T>
>   T S<T>::t[S<T>::a];
> The uses of 'a' are not identical, since the first is non-dependent,
> and the second is dependent.  But does that affect matching the definition
> to the declaration?  My inclination is to say no.

There is an open issue regarding this subject, which I volunteered to
work on.  But I certainly agree that these declarations should match.
(The example is ill-formed though, because the array size is zero :-)

John Spicer
Edison Design Group
------- End of forwarded message -------