-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Remove using namespace std #3235
Comments
I am a proponent of not using |
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs. |
1 header is still a culprit: Lots of cpp files though (209) including one header file which is using std inside octree namespace: |
I'm trying to push changes for this issue, but I keep getting:
Do I need to request access first? This happens on two different machines in two different OSes. |
You need to push to your fork and then open a PR. |
I'm trying to push my branch so I can open a PR, like so:
|
Your remote (say |
I suggest to remove
using namespace std
(onlystd
, but not e.g.std::chrono_literals
). Reason: There are some math function which exists as C method and as C++, so it is unclear which the compiler is using.Example:
pcl/features/src/pfh.cpp
Line 67 in 8163917
Here
acos
is used, which only accepts double values, duringstd::acos
have different overloadings (e.g. for float). Currently you have always to check if there is anusing namespace std
to get an idea, which version is used. If we disallow usage ofusing namespace std
it is always clear, thatacos
withoutstd::
isn't the wanted code by us.The text was updated successfully, but these errors were encountered: