This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[C++] Not implemented ...
- To: gcc-bugs at gcc dot gnu dot org
- Subject: [C++] Not implemented ...
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Date: Fri, 04 Aug 2000 19:28:50 +0200
This code below triggers some "not implemented" behaviour in pt.c:unify.
mururoa->g++ ScopeRef.C
ScopeRef.C:21: sorry, not implemented: use of `scope_ref' in template
type unification
ScopeRef.C: In function `int main ()':
ScopeRef.C:21: no matching function for call to `f (A<1, double> &)'
This is with gcc-2.95.2 as well as with today's cvs.
Indeed the SCOPE_REF nodes are not dealt with in unify.
The question is whether this should be considered as correct code
(AFAIK it is conforming code).
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Theodore.Papadopoulo 04 Aug 2000 <Theodore.Papadopoulo@sophia.inria.fr>
template <unsigned N,typename T>
struct A {
static const unsigned dim = N;
A() { }
~A() { }
};
template <class T>
double f(const A<T::dim,T>& a)
{
return 1.0;
}
int
main()
{
A<1,double> a;
double d = f(a);
}
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------