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

Make existing code c++17 compliant for future upgrade #479

Merged

Conversation

achristoforides
Copy link
Member

When compiling the project with -std=c++17, there are a few sections of the code which cause problems due to deprecation of certain APIs. This PR aims to fix these while still remaining the current c++ standard version (14) until a decision has been made to upgrade it.

In one instance, our code was using std::random_shuffle (which was deprecated), and in another, we were using std::binary_function (which was also deprecated). For the first issue, the usage of this API had to be updated; instead of using std::random_shuffle, we now use std;:shuffle and pass in the std::mt19937 as a UniformRandomBitGenerator. For the latter issue, switching this to use std::function<bool(ServiceListener, ServiceListener)> is sufficient.

All changes were built and tested on all platforms.

Signed-off-by: The MathWorks, Inc. Roy.Lurie@mathworks.com
Signed-off-by: The MathWorks, Inc. Roy.Lurie@mathworks.com
Signed-off-by: The MathWorks, Inc. Roy.Lurie@mathworks.com
@achristoforides achristoforides changed the title Make existing code c++14 compliant for future upgrade Make existing code c++17 compliant for future upgrade Jun 26, 2020
@jeffdiclemente jeffdiclemente merged commit e3aad73 into CppMicroServices:development Jun 29, 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

3 participants