Expressions - Overview

C++ compilers use recursive descent to parse expressions. To fully appreciate expression evaluation, it helps to understand how a compiler views expressions. Expressions are formed from a hierarchy defined as follows:

Recursive descent involves analysing an expression using a predefined order of precedence. The above list displays that order of precedence, and the closer to the top of the list an operator occurs, the tighter the binding within an expression. For operators within each category, the documentation indicates whether the order of evaluation is left-to-right or right-to-left.