You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/theia/sfm/estimators/estimate_radial_distortion_homography_test.cc:73:25: error: constexpr variable 'kRadDistThreshold1' must be initialized by a constant
expression
static constexpr double kRadDistThreshold1 =
^
src/theia/sfm/estimators/estimate_radial_distortion_homography_test.cc:74:11: note: non-constexpr function 'abs' cannot be used in a constant expression
0.1 * std::abs(kRadialDistortion1 * std::pow(kFocalLength1, 2));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:737:1: note: declared here
abs(double __lcpp_x) _NOEXCEPT {return ::fabs(__lcpp_x);}
^
Seems like Clang++ (v10.0) on OSX doesn't allow std::abs to be used in the definition of a constexpr. The same is true for std::pow().
I have a fix for this (see below), and have tried making a PR - but it looks like when I clone from GerritHub, it gives me a significantly older version of the repo (with most recent commit 14421f7), and this file didn't exist back then. I'm following the instructions on here, and cloning from this repo: https://review.gerrithub.io/sweeneychris/TheiaSfM. Did I make a mistake somewhere?
When compiling a fresh clone on OSX 10.14.3:
Seems like Clang++ (v10.0) on OSX doesn't allow std::abs to be used in the definition of a constexpr. The same is true for std::pow().
I have a fix for this (see below), and have tried making a PR - but it looks like when I clone from GerritHub, it gives me a significantly older version of the repo (with most recent commit 14421f7), and this file didn't exist back then. I'm following the instructions on here, and cloning from this repo: https://review.gerrithub.io/sweeneychris/TheiaSfM. Did I make a mistake somewhere?
Original code:
The fix:
The text was updated successfully, but these errors were encountered: