mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +03:00
Add a line to help remark identify code block inside bullet list
This commit is contained in:
committed by
Thibault Kruse
parent
a2dba2e78b
commit
2c8b34653d
@@ -14027,8 +14027,10 @@ This is a problem for people modernizing code.
|
|||||||
You can
|
You can
|
||||||
|
|
||||||
* update the library to be `const`-correct; preferred long-term solution
|
* update the library to be `const`-correct; preferred long-term solution
|
||||||
* "cast away `const`"; [best avoided](#Res-casts-const).
|
* "cast away `const`"; [best avoided](#Res-casts-const)
|
||||||
* provide a wrapper function; for example
|
* provide a wrapper function
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
void f(int* p); // old code: f() does not modify `*p`
|
void f(int* p); // old code: f() does not modify `*p`
|
||||||
void f(const int* p) { f(const_cast<int*>(p); } // wrapper
|
void f(const int* p) { f(const_cast<int*>(p); } // wrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user