Topic: Name Lookup rules
Author: loewis@informatik.hu-berlin.de (Martin v. =?iso-8859-1?q?L=F6wis?=)
Date: Sun, 22 Sep 2002 21:04:26 +0000 (UTC) Raw View
gdr@soliton.integrable-solutions.net (Gabriel Dos Reis) writes:
> See the note in 9.3/5.
Interestingly enough, the example of the OP nearly literally came from
9.3/5...
Regards,
Martin
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
Author: "tanton@bellsouth.net"@bellsouth.net ("Tanton Gibbs")
Date: Sat, 21 Sep 2002 19:07:33 +0000 (UTC) Raw View
If I have the following file:
struct X {
typedef int T;
void f( T t );
};
typedef float T;
void X::f( T t ) {
}
Is this well defined C++. If so, to what type does T resolve? Can someone
refer me to the standard passage on the subject?
Thanks!
Tanton
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
Author: gdr@soliton.integrable-solutions.net (Gabriel Dos Reis)
Date: Sat, 21 Sep 2002 19:43:53 +0000 (UTC) Raw View
"tanton@bellsouth.net"@bellsouth.net ("Tanton Gibbs") writes:
| If I have the following file:
|
| struct X {
| typedef int T;
| void f( T t );
| };
|
| typedef float T;
|
| void X::f( T t ) {
| }
|
| Is this well defined C++.
Yes.
| If so, to what type does T resolve?
The "T" in the definition of X::f resolves to X::T, i.e. int.
| Can someone
| refer me to the standard passage on the subject?
See the note in 9.3/5.
--
Gabriel Dos Reis gdr@integrable-solutions.net
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]