Skip to content

Commit

Permalink
Fix compilation on Windows
Browse files Browse the repository at this point in the history
MSVC was (correctly) complaining that std::pow does not evaluate to a
constant -- this was added in C++20 (I believe), while we compile
assuming C++11.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed May 25, 2023
1 parent 39a6471 commit 45b2a6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/numerical_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace constants {
constexpr double MPC2CM = MPC2M * HECTO;

/** Number of centimetres in a Mpc (Particle Data Book 2002, page 6) cubed*/
constexpr double MPC2CM_cube = std::pow(MPC2CM, 3);
constexpr double MPC2CM_cube = pow<3>(MPC2CM);

/** Number of cm in a km */
constexpr double KM2CM = 1e5;
Expand Down

0 comments on commit 45b2a6d

Please sign in to comment.