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:
@@ -521,14 +521,16 @@ void f(vector<string>& v)
|
|||||||
|
|
||||||
A much clearer expression of intent would be:
|
A much clearer expression of intent would be:
|
||||||
|
|
||||||
void f(vector<string>& v)
|
```cpp
|
||||||
{
|
void f(vector<string>& v)
|
||||||
string val;
|
{
|
||||||
cin >> val;
|
string val;
|
||||||
// ...
|
cin >> val;
|
||||||
auto p = find(begin(v), end(v), val); // better
|
// ...
|
||||||
// ...
|
auto p = find(begin(v), end(v), val); // better
|
||||||
}
|
// ...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
A well-designed library expresses intent (what is to be done, rather than just how something is being done) far better than direct use of language features.
|
A well-designed library expresses intent (what is to be done, rather than just how something is being done) far better than direct use of language features.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user