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

Rename ambiguous _iter_driver and pair_contained #136

Closed
wants to merge 1 commit into from

Conversation

traversaro
Copy link
Contributor

In the AttachView containers, the variables _iter_driver and pair_container was used to refer to both a reference argument passed to the container, and also to a pointer local variable that was defined inside a lamba function passed to a delating constructor.

In general this may not be readable, but on Windows with Visual Studio 2022 (cl.exe version: 19.29.30153) this also creates a compilation error:

D:\src\zenoh-cpp\include\zenohcxx\api.hxx(713,34): error C3493: '_iter_driver' cannot be implicitly captured because no default capture mode has been specified [D:\src\zenoh-cpp\examples\build2022\z_simple_zenohc.vcxproj]
D:\src\zenoh-cpp\include\zenohcxx\api.hxx(726,48): error C3493: 'pair_container' cannot be implicitly captured because no default capture mode has been spe
cified [D:\src\zenoh-cpp\examples\build2022\z_pub_attachment_zenohc.vcxproj]

This PR solves both the compilation problem (and the general readability problem) by renaming the local variables to a different name.

@Mallets
Copy link
Member

Mallets commented Sep 13, 2024

The Attachment API has been reworked in 1.0.0 to use ZBytes.
AttachView has been completely removed.

@Mallets Mallets closed this Sep 13, 2024
@traversaro
Copy link
Contributor Author

Thanks!

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.

2 participants