Bug #1288

Updated by ganeva over 4 years ago

The error is caused by FormFactorTetrahedron.cpp:

The compiler information:


================


-- The C compiler identification is AppleClang 7.0.2.7000181
-- The CXX compiler identification is AppleClang 7.0.2.7000181
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
[...]
-- Compiler Flags: -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -I/Users/ganeva/build/bornagain/BornAgain/Core/Tools/inc -include WinDllMacros.h -std=c++11 -O2
================


================

The error message:


============


Users/ganeva/build/bornagain/BornAgain/Core/FormFactors/src/FormFactorTetrahedron.cpp:86:22: error: constexpr variable 'root3'
must be initialized by a constant expression
constexpr double root3 = std::sqrt(3.);
^ ~~~~~~~~~~~~~
/Users/ganeva/build/bornagain/BornAgain/Core/FormFactors/src/FormFactorTetrahedron.cpp:86:30: note: non-constexpr function 'sqrt'
cannot be used in a constant expression
constexpr double root3 = std::sqrt(3.);
^
/usr/include/math.h:447:15: note: declared here
extern double sqrt(double);
^
/Users/ganeva/build/bornagain/BornAgain/Core/FormFactors/src/FormFactorTetrahedron.cpp:115:22: error: constexpr variable 'root3'
must be initialized by a constant expression
constexpr double root3 = std::sqrt(3.);
^ ~~~~~~~~~~~~~
/Users/ganeva/build/bornagain/BornAgain/Core/FormFactors/src/FormFactorTetrahedron.cpp:115:30: note: non-constexpr function 'sqrt'
cannot be used in a constant expression
constexpr double root3 = std::sqrt(3.);
^
/usr/include/math.h:447:15: note: declared here
extern double sqrt(double);

============

Back