This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/40315] template instantiation fails when using const typename
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2009 23:06:12 -0000
- Subject: [Bug c++/40315] template instantiation fails when using const typename
- References: <bug-40315-17781@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from jason at gcc dot gnu dot org 2009-11-08 23:06 -------
Actually, I'm not so sure:
template<class T>
struct A
{
typedef A arr[3];
};
template<class T>
void f(const typename A<T>::arr) { }
template void f<int>(const A<int>::arr); // #1
template <class T>
struct B
{
void g(T);
};
template <class T>
void B<T>::g(const T) { } // #2
it seems to me that either #1 is well-formed, or #2 is, though it might make
sense to recompute the function type from the parameter type...in any case, I'm
opening a DR about this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40315