Incorrect use of std::min and std::max template functions in vpMath
OgreTransporter opened this issue · comments
The functions std::min (https://en.cppreference.com/w/cpp/algorithm/min) and std::max (https://en.cppreference.com/w/cpp/algorithm/max) are template functions and require a specified data type. In visp/modules/core/include/visp3/core/vpMath.h
this data type specification is missing everywhere. This can lead to compiler errors.
Example:
visp/modules/core/include/visp3/core/vpMath.h
Line 491 in cc36909
Fix:
return static_cast<unsigned char>(std::max<int>(static_cast<int>(v), 0));
MSVC error log:
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,44): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,39): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,39): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,71): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,42): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,37): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,37): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,113): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,42): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,37): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,37): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,86): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,68): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,104): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,77): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,45): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,40): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,40): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,72): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,43): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,38): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,38): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,70): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,43): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,44): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,39): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,38): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,39): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,38): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,71): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,87): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,42): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,37): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,37): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,113): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,34): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,29): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,29): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,68): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,42): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,37): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,37): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,34): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,86): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,29): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,29): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,77): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpAR.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,68): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,104): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,77): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,45): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,40): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,40): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,72): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,43): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,38): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,38): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,70): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,43): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,38): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,38): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,87): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,34): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,29): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,29): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,68): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,34): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,29): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,29): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,77): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpViewer.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,44): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,39): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,39): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(491,71): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,42): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,37): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,37): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(498,113): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,42): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,37): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,37): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(513,86): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(531,68): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(536,104): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,33): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,28): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,28): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(551,77): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,45): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,40): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,40): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(575,72): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,43): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,38): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,38): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(582,70): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,43): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,38): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,38): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(592,87): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,34): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,29): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,29): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(610,68): error C2059: syntax error: ')'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,34): error C2589: '(': illegal token on right side of '::'
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,29): error C2062: type 'unknown-type' unexpected
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,29): error C2144: syntax error: 'unknown-type' should be preceded by '('
1>(compiling source file '../../../src/modules/ar/src/coin-simulator/vpSimulator.cpp')
1>D:\ViSP\src\modules\core\include\visp3\core\vpMath.h(618,77): error C2059: syntax error: ')'
@OgreTransporter Thanks. Just for curiosity, what is your MSVC version?
You're welcome! I am using the latest version of Microsoft Visual Studio 2022 (17.8.3) with the compiler 19.38.33133.
Thank you for fixing and merging! Works perfectly.