Closed ArminHHJ closed 2 years ago
Could you help? Get error when I compile stackfisch-uct on Mac. make profile-build ARCH=x86-64-bmi2 COMP=clang
search.cpp:2113:22: error: constexpr variable 'C' must be initialized by a constant expression constexpr double C = 1.6 std::sqrt(2); ^ ~~~~~~ search.cpp:2113:32: note: non-constexpr function 'sqrt' cannot be used in a constant expression constexpr double C = 1.6 std::sqrt(2); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:1034:1: note: declared here sqrt(_A1 lcpp_x) _NOEXCEPT {return ::sqrt((double)lcpp_x);} ^ 1 error generated. make[1]: [search.o] Error 1 make: [build] Error 2 armin@Armins-MacBook-Pro src %
Try changing to const double C = 1.6 * std::sqrt(2); or double C = 1.6 * std::sqrt(2);
const double C = 1.6 * std::sqrt(2);
double C = 1.6 * std::sqrt(2);
funktioniert. Danke
Could you help? Get error when I compile stackfisch-uct on Mac. make profile-build ARCH=x86-64-bmi2 COMP=clang
search.cpp:2113:22: error: constexpr variable 'C' must be initialized by a constant expression constexpr double C = 1.6 std::sqrt(2); ^' cannot be used in a constant expression
constexpr double C = 1.6 std::sqrt(2);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:1034:1: note: declared here
sqrt(_A1 lcpp_x) _NOEXCEPT {return ::sqrt((double)lcpp_x);}
^
1 error generated.
make[1]: [search.o] Error 1
make: [build] Error 2
armin@Armins-MacBook-Pro src %
~~~~~~ search.cpp:2113:32: note: non-constexpr function 'sqrt