Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROL: "using namespace std" anti-pattern #13532

Open
rileyjmurray opened this issue Oct 15, 2024 · 5 comments
Open

ROL: "using namespace std" anti-pattern #13532

rileyjmurray opened this issue Oct 15, 2024 · 5 comments
Assignees
Labels

Comments

@rileyjmurray
Copy link

There are a 15 files in ROL/src that use the "using namespace std" (anti-)pattern. I noticed this when compiling with clang 17.
Image

My compiler mostly complained about unqualified use of std::forward in one file (ROL_VectorClone.hpp). But there might be other places where unqualified standard library functions are used.

Does anyone have objections to me removing the "using namespace std;" lines and making things explicit, as needed?

Copy link

Automatic mention of @aj463

@ccober6
Copy link
Contributor

ccober6 commented Oct 15, 2024

@trilinos/rol

@gregvw gregvw self-assigned this Oct 16, 2024
@gregvw
Copy link
Contributor

gregvw commented Oct 16, 2024

I will take care of these

@gregvw
Copy link
Contributor

gregvw commented Oct 16, 2024

These are have all been fixed in the ROL development branch so it's just a matter of merging to Trilinos.

I wrote a clang-tidy check that can either automatically replace using namespace foo with using foo::bar in the same location for every bar symbol used or alternatively prepend all of the symbols with the appropriate foo:: namespace qualifier if that is of any interest.

Copy link

github-actions bot commented Nov 7, 2024

Automatic mention of @aj463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants