mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
ChessEngine: Don't call non-constexpr sqrt
in a constexpr intiializer
GCC likely has a builtin intrinsic that evaluates the operation at compile-time, even if the `LibM` is not declared as constexpr. Clang, however, does not like it, and it failed to compile this code.
This commit is contained in:
parent
44b6f402ae
commit
6f6b1b3ea1
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ public:
|
||||||
private:
|
private:
|
||||||
// While static parameters are less configurable, they don't take up any
|
// While static parameters are less configurable, they don't take up any
|
||||||
// memory in the tree, which I believe to be a worthy tradeoff.
|
// memory in the tree, which I believe to be a worthy tradeoff.
|
||||||
static constexpr double s_exploration_parameter { sqrt(2) };
|
static constexpr double s_exploration_parameter { M_SQRT2 };
|
||||||
// FIXME: Optimize simulations enough for use.
|
// FIXME: Optimize simulations enough for use.
|
||||||
static constexpr EvalMethod s_eval_method { EvalMethod::Heuristic };
|
static constexpr EvalMethod s_eval_method { EvalMethod::Heuristic };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue