This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/35: Re: gcc-2.9[56] lookup problem
- To: gcc-gnats at sourceware dot cygnus dot com
- Subject: c++/35: Re: gcc-2.9[56] lookup problem
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sat, 4 Mar 2000 22:01:58 +0100
- References: <yg9pv0k84g5.fsf@pcmath03.insa-lyon.fr>
- Resent-Cc: gcc-prs at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
>Number: 35
>Category: c++
>Synopsis: [not accepted] gcc-2.9[56] lookup problem
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 04 13:16:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Pierre Aubert <paubert@pcmath03.insa-lyon.fr>
>Release: 2.95.2
>Organization:
C.I.S.M. Universite Claude Bernard Lyon 1 / INSA de Lyon
>Environment:
>Description:
Date: 19 Aug 1999 12:12:10 +0200
bug report
platform independant. it does not compile with all the egcs
versions I have access to.
----------------------------------------------------------------------
template <short B,short E>
class R {};
template <class T>
class A {
public:
explicit A( T const& t ) : my_t(t){ }
template <short B,short E>
A<T>
operator() ( R<B,E> const& r ) { return A<T>(my_t); }
T get() const { return my_t; }
private:
T my_t;
};
int main() {
A<int> a(10);
R<1,3> r;
// OK
if( a.template operator()<1,3>(r).get() != 10 )
return 1;
// don't find it
if ( a(r).get() != 10 )
return 2;
return 0;
}
----------------------------------------------------------------------
gcc don't find the a(r) call. Do we have to use the a.template ... call?
aCC and KCC seem to find both calls.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: