zenoh-cpp
zenoh-cpp copied to clipboard
Rename ambiguous _iter_driver and pair_contained
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.