Documentation: Don't use std:: in examples

We don't use `std::swap()`, so don't mention it in documentation :^)
This commit is contained in:
Nico Weber 2024-11-25 09:00:26 -05:00
parent fcb45f4893
commit eaec863b94

View file

@ -339,8 +339,7 @@ In C++ implementation files, do not use "using" declarations of any kind to impo
```cpp ```cpp
// File.cpp // File.cpp
std::swap(a, b); Core::ArgsParser args_parser;
c = std::numeric_limits<int>::max()
``` ```
###### Wrong: ###### Wrong:
@ -348,8 +347,8 @@ c = std::numeric_limits<int>::max()
```cpp ```cpp
// File.cpp // File.cpp
using std::swap; using Core::ArgsParser;
swap(a, b); ArgsParser args_parser;
``` ```
###### Wrong: ###### Wrong:
@ -357,8 +356,8 @@ swap(a, b);
```cpp ```cpp
// File.cpp // File.cpp
using namespace std; using namespace Core;
swap(a, b); ArgsParser args_parser;
``` ```
### Types ### Types