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

namespace bandit has "using namespace std" #13

Closed
je4d opened this issue Aug 10, 2013 · 2 comments
Closed

namespace bandit has "using namespace std" #13

je4d opened this issue Aug 10, 2013 · 2 comments
Labels
bug Approved bug in bandit

Comments

@je4d
Copy link

je4d commented Aug 10, 2013

Namespace bandit has "using namespace std".

I'd like to be able to do "using namespace bandit" in my unit tests as per the examples, but still expect my tests to not compile when I make the rookie error of omitting 'std::' somewhere in the headers of the code I'm testing.

joakimkarlsson added a commit that referenced this issue Aug 10, 2013
This could hide the fact that the test code missed specifying that
the 'std' namespace should be used.

Addresses issue: #13
@joakimkarlsson
Copy link
Collaborator

@je4d I've pushed a commit removing this. Could you verify that it works on your end?

@je4d
Copy link
Author

je4d commented Aug 11, 2013

@joakimkarlsson Works great, I re-introduced the errors that caused me to file this bug, and verified that they caused compilation failures in the unit. Many thanks for the quick response!

I also noticed that you're also doing "using namespace detail;" in bandit. It's not causing any issues for me at the moment, but it's potentially problematic for who has class names that conflict with your internal classes, and could even cause false-positive regressions for users when you release a version with new classes in the detail namespace.

@je4d je4d closed this as completed Aug 11, 2013
joakimkarlsson added a commit that referenced this issue Aug 11, 2013
Fixes potential problems with namespace leaks.

Addresses issue: #13
joakimkarlsson added a commit that referenced this issue Aug 11, 2013
This could cause potential problems in client code due to namespace
leaks.

Addresses issue: #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Approved bug in bandit
Projects
None yet
Development

No branches or pull requests

2 participants