[ J ] a [ Y ]
2010-04-10 00:04:11 UTC
1. int f( ) const;
2. int g(const A& x);
My initial expectation with the first declaration was that it would actually be invalid, since there isnt anything following the const keyword. But it actually works, and in order to define the function later, I need to proceed the function name with the const keyword again. Whats the point of this??
As for 2, its really ambiguous to my eyes. Any interpretations are welcome.