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

Fix name clash with std::byte #764

Merged
merged 2 commits into from
Sep 2, 2021
Merged

Fix name clash with std::byte #764

merged 2 commits into from
Sep 2, 2021

Conversation

pattacini
Copy link
Member

Fixes #763.

@pattacini pattacini self-assigned this Sep 2, 2021
Comment on lines +39 to +41
if(WIN32)
target_compile_definitions(skinManagerGui PUBLIC _HAS_STD_BYTE=0)
endif()
Copy link
Member Author

@pattacini pattacini Sep 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, there's a native problem with some Windows SDK and std::byte defined in C++17.
This problem impacts the compilation of some skinManagerGui auto-generated files.

Here's the proposed solution.

We also need to be careful as in the future _HAS_STD_BYTE will get removed.

cc @Nicogene @traversaro @vtikha

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we open an issue on how to fix this in a more permanent way? Perhaps just avoiding a windows include or a using namespaces std somewhere in skinManagerGui could help in this case.

Copy link
Member

@traversaro traversaro Sep 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rem]: https://github.com/microsoft/STL/issues/20

I guess there was a typo and the correct issues is microsoft/STL#204 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we open an issue on how to fix this in a more permanent way? Perhaps just avoiding a windows include or a using namespaces std somewhere in skinManagerGui could help in this case.

Unfortunately, the failure is triggered within files that are generated by Qt, which in turn do include the "problematic" Windows SDK resources.

After a quick F2F alignment, we've decided to go this way.

@pattacini pattacini merged commit 4078e16 into master Sep 2, 2021
@pattacini pattacini deleted the fix/763 branch September 2, 2021 11:01
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.

Compilation failure when compiling icub-main devel branch against yarp latest master branch (2021/09/02)
3 participants