freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] std:: Policy for PoomaOps.in?


From: Gabriel Dos Reis
Subject: Re: [pooma-dev] std:: Policy for PoomaOps.in?
Date: 10 Jul 2001 22:12:17 +0200

James Crotinger <address@hidden> writes:

| int main()
| {
|   MySpace::A<int> a(1);
|   MySpace::A<int> b(2);
|  
|   MySpace::A<int> c = sum(a,b);
|  
|   cout << "A(1) + A(2) = " << c.t_m << endl;
|  
|   cout << "1 + 2       = " << MySpace::sumInt(1,2) << endl;
|  
|   return 0;
| }
| 
| The line of note is "c = sum(a,b)". If Koenig lookup is implemented, the
| function "sum" does not need to be qualified with MySpace::, unlike the call
| to sumInt, which does need to be qualified. 
|  
| This appears to work with GCC 2.95, but I seem to recall that there are
| problems with its implementation. Marks says 3.00 works.

Well, I guess I created some confusion with my nuance on Mark's
statement. Koenig lookup was implemented in GCC-2.95, but there were
some problems (which are now corrected in GCC-3.0).  To have Koenig
lookup work well in generic codes, one often needs to bring in scope
some symbols which could be not be found otherwise.  The natural
mechanism for that is a using-declaration. But the problem with GCC-2.95
was that using-declarations in function templates were simply ignored.
That is no longer the case with GCC-3.0.

Hope I cleared the confusion I created,

-- Gaby

reply via email to

[Prev in Thread] Current Thread [Next in Thread]