stereolabs / zed-matlab

ZED SDK interface sample for Matlab

Home Page:https://www.stereolabs.com/docs/matlab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no match for ‘operator=’ (operand types are ‘sl::SpatialMappingParameters::interval

suijingfeng opened this issue · comments

/home/suijingfeng/Desktop/zed/zed-matlab/src/mex/mexZED.cpp: In function ‘void mexFunction(int, mxArray**, int, const mxArray**)’:
/home/suijingfeng/Desktop/zed/zed-matlab/src/mex/mexZED.cpp:751:51: error: no match for ‘operator=’ (operand types are ‘sl::SpatialMappingParameters::interval {aka std::pair<float, float>}’ and ‘float’)
mapParams.range_meter = val;
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/string:40,
from /usr/include/c++/5/stdexcept:39,
from /usr/include/c++/5/array:38,
from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/cvdef.h:428,
from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core.hpp:52,
from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/opencv.hpp:52,
from /home/suijingfeng/Desktop/zed/zed-matlab/src/mex/mexZED.cpp:10:
/usr/include/c++/5/bits/stl_pair.h:158:7: note: candidate: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) [with _T1 = float; _T2 = float]
operator=(const pair& __p)
^
/usr/include/c++/5/bits/stl_pair.h:158:7: note: no known conversion for argument 1 from ‘float’ to ‘const std::pair<float, float>&’
/usr/include/c++/5/bits/stl_pair.h:166:7: note: candidate: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) [with _T1 = float; _T2 = float]
operator=(pair&& __p)
^
/usr/include/c++/5/bits/stl_pair.h:166:7: note: no known conversion for argument 1 from ‘float’ to ‘std::pair<float, float>&&’
/usr/include/c++/5/bits/stl_pair.h:177:2: note: candidate: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = float; _T2 = float]
operator=(const pair<_U1, _U2>& __p)
^
/usr/include/c++/5/bits/stl_pair.h:177:2: note: template argument deduction/substitution failed:
/home/suijingfeng/Desktop/zed/zed-matlab/src/mex/mexZED.cpp:751:51: note: mismatched types ‘const std::pair<_T1, _T2>’ and ‘float’
mapParams.range_meter = val;
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/string:40,
from /usr/include/c++/5/stdexcept:39,
from /usr/include/c++/5/array:38,
from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/cvdef.h:428,
from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core.hpp:52,
from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/opencv.hpp:52,
from /home/suijingfeng/Desktop/zed/zed-matlab/src/mex/mexZED.cpp:10:
/usr/include/c++/5/bits/stl_pair.h:186:2: note: candidate: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = float; _T2 = float]
operator=(pair<_U1, _U2>&& __p)
^
/usr/include/c++/5/bits/stl_pair.h:186:2: note: template argument deduction/substitution failed:
/home/suijingfeng/Desktop/zed/zed-matlab/src/mex/mexZED.cpp:751:51: note: mismatched types ‘std::pair<_T1, _T2>’ and ‘float’
mapParams.range_meter = val;
^
mex/CMakeFiles/mexZED.dir/build.make:62: recipe for target 'mex/CMakeFiles/mexZED.dir/mexZED.cpp.o' failed
make[2]: *** [mex/CMakeFiles/mexZED.dir/mexZED.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'mex/CMakeFiles/mexZED.dir/all' failed
make[1]: *** [mex/CMakeFiles/mexZED.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days