The cppref article quoted says:
Kernel constant expression - any expression that does not have one of the following.
7) An expression whose evaluation leads to any form of the main language (since C ++ 17) undefined behavior (including integer overflow of integers, division by zero, pointer, arithmetic external array, bound , etc.). Regardless of whether the behavior of the standard library is undefined, undefined. (since C ++ 17)
19) the subtraction operator between two pointers (before C ++ 14)
Probably only the ptr arithemtics array inside the boundaries of the array gets "legalized" since C ++ 14, and not all arithmetic pointers
In fact, the demo shows that the ptr arithmetics array compiles well even with C ++ 11 (and not C ++ 98)
source share