-
Notifications
You must be signed in to change notification settings - Fork 54
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
No windows.h in header files #118
Conversation
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic, and exactly what we need. Thanks for doing this!
I have two nits inline. Also, I'm wondering if we should just move the implementation of the constructor that takes a std::string
into the C++ file as well. It is minor, but putting it there helps on compile times, and just makes it so all of the implementation is in one place.
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Moved all method and free function definitions to the source file in 82a0901. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with green CI.
Same jobs also including ros2/rosbag2#600: |
Windows once again, also testing ros2/rcl_logging#71: |
windows.h
should not be included in any header file because it bizarrely pollutes the global namespace with macros that can easily collide with other names.My favorites: min, max, ERROR, NO_ERROR, and even more.
IMO trying to make all our headers compatible with
windows.h
is a bit hopeless, so we should avoid includingwindows.h
in header files and use custom workarounds in source files when appropriate (an#undef
or#define NOMINMAX
usually fix collisions).