mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-22 16:21:04 -05:00
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:
committed by
Henrik Lissner
parent
9cc9351cae
commit
25602409b6
@@ -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;
|
||||
|
Reference in New Issue
Block a user