diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-14 13:17:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-14 13:17:54 +0200 |
commit | 9761746f14c81ba0dbd023d31f0e4662c12da66b (patch) | |
tree | ed211a94022ee12441b177210614cbacbcfd11b9 | |
parent | 00a601a9268d7c85be2147a2b7af9f855ea7d957 (diff) |
Move 'using namespace' inside main() in new-generated projects
-rw-r--r-- | bdep/new.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bdep/new.cxx b/bdep/new.cxx index 46f874b..b04aba3 100644 --- a/bdep/new.cxx +++ b/bdep/new.cxx @@ -358,10 +358,10 @@ namespace bdep os.open (f = sd / n + ".c" + x); os << "#include <iostream>" << endl << endl - << "using namespace std;" << endl - << endl << "int main (int argc, char* argv[])" << endl << "{" << endl + << " using namespace std;" << endl + << endl << " if (argc < 2)" << endl << " {" << endl << " cerr << \"error: missing name\" << endl;" << endl @@ -885,11 +885,11 @@ namespace bdep << "#include <" << n << "/" << ver << ">" << endl << "#include <" << n << "/" << hdr << ">" << endl << endl - << "using namespace std;" << endl - << "using namespace " << s << ";" << endl - << endl << "int main ()" << endl << "{" << endl + << " using namespace std;" << endl + << " using namespace " << s << ";" << endl + << endl << " // Basics." << endl << " //" << endl << " {" << endl |