> It's not redundant in the sense that you can omit it to create an equivalent > program. It's redundant with regard to the return value it yields. > > If you do "&foo::operator int *const", then you get a "int * const(foo::*) > ()". If you remove the "const", then you get a "int*(foo::*)()". Meaning, it > *does* affect the type/return type of the conversion function (as is the > case for other functions too). > > However, calling it will yield an rvalue of type "int*", therefor it won't > change the type of a function call. Maybe warning "'const' type qualifier > has no effect on function return value" would be more accurate, even if > still (IMO) slightly ambiguous.
OK, I agree we should warn and that we probably need a special wording for conversion functions. I will open a bug. Cheers, Rafael _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
