This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/40315] template instantiation fails when using const typename



------- 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


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