Rule: Return pointee gained const¶
Canonical rule slug: return-pointee-gained-const. ← back to all rules
A function returning a pointer gains const on the pointee -- binary-identical, but callers that store the result in a non-const pointer no longer compile.
Canonical demonstration¶
- case211_return_pointee_gained_const — Return Pointee Gained
const(🟠 API_BREAK)