*
Na********@gmail.com:
typedef double type;
class A {
typedef int type;
void f(type);
};
void A::f(type)
{
}
int main() { }
I was wondering if this code was correct. It compiles correctly under
gcc, but by the standard, does the last usage of type need to be
qualified as A::type?
No, it's OK. However the function result type needs to be qualified if
it refers to a type defined in the class. The 1998 C++ standard is a
bit unclear and inconsistent about this; it was corrected in C++ 2003.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?