Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: gcc-2.9[56] lookup problem

0 views
Skip to first unread message

KP KP

unread,
Aug 2, 2022, 10:52:17 AM8/2/22
to
On Thursday, August 19, 1999 at 12:00:00 AM UTC-7, Pierre Aubert wrote:
> 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.
> Ciao.
> --
> Pierre Aubert pau...@mathinsa.insa-lyon.fr
> http://mathinsa.insa-lyon.fr/~paubert phone +33 04 72 43 89 16
chitttttard
0 new messages