In C ++, how does a strict bottom-up analysis imply that the return type is not used when permission is overloaded?

In the Bjarne book , he said

Persistence in rigorous bottom-up analysis implies that the return type is not used when permission is overloaded.

It seems that bottom-up analysis is related to how the compiler parses C ++ codes.

What does he mean by saying this?

Sincerely.

+7
c ++ compiler-construction compilation
source share
1 answer

Bottom-up analysis, in particular, means that the type of subexpression must be defined to the type of meaningful excretion, for example, if we have the expression g(f()) , the type f() must be defined before the compiler starts resolving overload for g() . This could not be done if we had:

 int f(); float f(); void g(float); // Even though g() accepts only float, bottom-up analysis implies that // this information is not available during resolution of f(). g(f()); 
+8
source share

All Articles