Originally created by: *anonymous
Originally created by: nine.fie...@gmail.com
Originally owned by: nine.fie...@gmail.com
"using namespace std;" seems to be *everywhere* in Lilypond. It appears in *.cc files before headers are included. It appears in header files too.
"using" directives should not be used where they might affect more than the current file.
The patch for this issue will have to wait for a handful of issues that I found along the way to be fixed, but here is the summary:
* eliminate "using namespace std;"
* add "std::" to everything in *.hh files (and other included files)
* add "using std::whatever;" in *.cc files for common types (e.g. string, vector)
* add "std::" in *.cc files for functions (e.g. swap) and other less common things (e.g. less)
Latest attempt: https://codereview.appspot.com/579240043/
Earlier attempts: https://codereview.appspot.com/254670043/
Originally posted by: nine.fie...@gmail.com
https://codereview.appspot.com/254670043/
Labels: -Type-Maintainability Type-Patch Patch-new
Originally posted by: pkx1...@gmail.com
passes make, make check and a full make doc
Labels: -Patch-new Patch-review
Originally posted by: pkx1...@gmail.com
Patch on countdown for August 20th.
Labels: -Patch-review Patch-countdown
Originally posted by: pkx1...@gmail.com
Patch counted down - please push
Labels: -Patch-countdown Patch-push
Originally posted by: nine.fie...@gmail.com
Pushed to staging:
commit [r59a6d1a06432fc0ca88c3023c646182f389ec1b5]
Author: Dan Eble <nine.fierce.ballads@gmail.com>
Date: Thu Aug 20 19:06:03 2015 -0400
Issue 4550 (2/2) Avoid "using namespace std;" in included files
These changes are produced by a rather long shell script that is
posted in the code review for this issue. Summary:
* remove "using namespace std;" everywhere
* add "std::" in *.hh and other included files
* add "std::" to functions and lesser-used types in *.cc files
commit [rf127e14af04f474d20406ca0e0f76f05061ee103]
Author: Dan Eble <nine.fierce.ballads@gmail.com>
Date: Sat Aug 8 13:11:02 2015 -0400
Issue 4550 (1/2) Avoid "using namespace std;" in included files
These are manual changes in preparation for an automated removal of
"using namespace std;".
Mostly these are additions of using-declarations for commonly used
types and containers (e.g. std::string, std::vector) to *.cc files so
that they will continue to build after the big removal.
Labels: -Patch-push Fixed_2_19_26
Status: Fixed
Related
Issues:
#4550Originally posted by: dak@gnu.org
Because of several outstanding issues not caught timely in review and testing,
reverted with commits
commit [r24107d843c902a8101fbb696f47bf7538dd4493a]
Author: David Kastrup <dak@gnu.org>
Date: Sun Aug 23 21:59:31 2015 +0200
Revert "Issue 4550 (1/2) Avoid "using namespace std;" in included files"
This reverts commit [rf127e14af04f474d20406ca0e0f76f05061ee103].
commit [r207f71b8b2ab9ca550e841615bedce393e652ca6]
Author: David Kastrup <dak@gnu.org>
Date: Sun Aug 23 21:58:47 2015 +0200
Revert "Issue 4550 (2/2) Avoid "using namespace std;" in included files"
This reverts commit [r59a6d1a06432fc0ca88c3023c646182f389ec1b5].
Labels: -Type-Patch -Fixed_2_19_26 Type-Maintainability
Status: Started
Related
Issues:
#4550Diff:
Trying again. The original manual changes (1/2) applied cleanly over the current master and running the same script again (2/2) produced buildable code.
https://codereview.appspot.com/269000043/
Passes make, make check and a full make doc.
Patch on countdown for October 2nd.
Patch counted down - please push
Pushed to staging. Commit 2/2 didn't rebase cleanly so I discarded the reviewed version and ran the script again.
commit cb0b407e567feca71cbc5f9479a06b266c69a26c
Author: Dan Eble nine.fierce.ballads@gmail.com
Date: Sat Oct 3 12:29:13 2015 -0400
commit 1de3d397c18622b6061402fef18e625701712bc5
Author: Dan Eble nine.fierce.ballads@gmail.com
Date: Sat Aug 8 13:11:02 2015 -0400
Reverted again since it still fails to convert isinf to std::isinf, resulting in a failed build as in the previous iteration.
commit 626874c8eecfbeb04ca8ffec3fb78da48859b42f
Author: David Kastrup dak@gnu.org
Date: Sun Oct 18 15:24:26 2015 +0200
commit 5af7cd44435fd26fade6e700a3912630e1553a87
Author: David Kastrup dak@gnu.org
Date: Sun Oct 18 15:22:53 2015 +0200
Issue 4550: Avoid "using namespace std;" in included files
https://codereview.appspot.com/579240043
Diff:
Passes make, make check and a full make doc.