Closed wg21bot closed 1 year ago
CWG 2022-11-08: Accepted with Modifications. See CWG2631 for details.
P2710R0 does not seem to call out this NB comment.
Indeed; clerical error in P2710R0. I've just updated CWG2631 as represented in the issues list.
Because source_location is a consteval function, it is immediately evaluated in default arguments, producing a source location information for the location of the function declaration, which makes source_location unusable for the purposes it was designed.
The behaviour of consteval function in default argument is otherwise inconsistent as in other circumstances, default arguments are always evaluated at the point of call.
Please adopt CWG2631