mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-18 21:24:41 +03:00
testing backticks-cpp
This commit is contained in:
@@ -484,12 +484,14 @@ What is expressed in code has defined semantics and can (in principle) be checke
|
||||
|
||||
##### Example
|
||||
|
||||
```cpp
|
||||
class Date {
|
||||
public:
|
||||
Month month() const; // do
|
||||
int month(); // don't
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
The first declaration of `month` is explicit about returning a `Month` and about not modifying the state of the `Date` object.
|
||||
The second version leaves the reader guessing and opens more possibilities for uncaught bugs.
|
||||
@@ -498,6 +500,7 @@ The second version leaves the reader guessing and opens more possibilities for u
|
||||
|
||||
This loop is a restricted form of `std::find`:
|
||||
|
||||
```cpp
|
||||
void f(vector<string>& v)
|
||||
{
|
||||
string val;
|
||||
@@ -512,6 +515,7 @@ This loop is a restricted form of `std::find`:
|
||||
}
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
##### Example, good
|
||||
|
||||
|
||||
Reference in New Issue
Block a user