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

[windows][melodic] use c++11 std::snprintf #1820

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

seanyen
Copy link
Contributor

@seanyen seanyen commented Oct 1, 2019

This pull request is in favor of C++11 std::snprintf usage and to remove MSVC specific CRT functions _snprintf_s.

This change is motivated by a name conflicts against Boost. Beginning from Boost v1.69, a new addition system_category_win32.hpp is added to Boost.System, and in this header, it refers to std::snprintf in a code path. And because snprintf has been redefined as _snprintf_s in many places in ros_comm, it subsequently replaces std::snprintf with std::_snprintf_s and results in compiler errors.

@seanyen
Copy link
Contributor Author

seanyen commented Jan 8, 2020

@mikepurvis This is ready for review too. The change basically is in favor of standard C++11 over MSVC specific APIs.

@mikepurvis
Copy link
Member

Great, thanks! I'm assuming that since ROS 1 on Windows is all officially still at an experimental stage, there's minimal commitment to supporting older MSVCs where this might not work?

@mikepurvis mikepurvis merged commit d9059f4 into ros:melodic-devel Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants