May object pointer be always compared with nullptr in a constant expression?
The following program was reduced to demonstrate the question. struct A
has a constexpr
member function that compares this
against some pointer, which can be nullptr
. Then this member function is called for a temporary object (taking address of rvalue) inside a constant expression: