1
votes

The definition of a core constant expression depends on the concept of a constant expression as can be seen in bullet points (2.7.1) and (2.9.1) of N4140.

§5.19/2:

A conditional-expression e is a core constant expression unless the evaluation of e, following the rules of the abstract machine (1.9), would evaluate one of the following expressions:

...

(2.7.1) — a non-volatile glvalue of integral or enumeration type that refers to a non-volatile const object with a preceding initialization, initialized with a constant expression

...

(2.9.1) — it is initialized with a constant expression or

And the definition of a constant expression depends on the concept of a core constant expression, as can be seen in §5.19/4 of N4140:

A constant expression is either a glvalue core constant expression whose value refers to an object with static storage duration or to a function, or a prvalue core constant expression whose value is an object where, for that object and its subobjects:
...

This seems to defy the basic principles of mathematical logic.

1
What's exactly the question?skypjack
Expressions can contain other expressions; that isn't a problem.Alan Stokes
It doesn't defy logic because the expressions in your code form a tree, not a graph with cyclesM.M

1 Answers

1
votes

The definitions are mutually recursive, but not actually circular.