refactor(file-templates): c++-mode/__main.cpp: modernize
- Drops `using namespace std`: a known anti-pattern which imports a massive namespace into the global namespace. See https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice - Modernizes/generalizes `main`'s signature with a trailing return type (C++11) Ref: https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice Close: #7387
This commit is contained in:
parent
9cc9351cae
commit
25602409b6
1 changed files with 1 additions and 3 deletions
|
@ -4,9 +4,7 @@
|
|||
# --
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
auto main(int argc, char *argv[]) -> int {
|
||||
$0
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue