model-writtenrun 3765 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro reported that unconstify() and unvolatize() could not be used in C++ or header inline functions because __builtin_types_compatible_p is C-only, proposed excluding C++ from that implementation, and suggested leaving the analogous relptr_access() limitation alone because it did not currently break cpluspluscheck #1.
- Peter Eisentraut agreed with the diagnosis and suggested using C++ const_cast for alternative definitions #2.
- Thomas confirmed that const_cast worked for his case and attached a patch defining both macros that way under __cplusplus, leaving relptr.h unchanged #3.
- The patch from #3 landed with its code unchanged as baf7c93ed5, with an expanded commit explanation and credit to Peter for the suggestion.
- Thomas confirmed the push and closed the thread with thanks; the entire attached patch had landed #4.