diff --git a/include/teqp/constants.hpp b/include/teqp/constants.hpp index 67c224b96bd66cb41e71b44c8235ed421fb97040..9aae2b0ee043785c756535933cf642934d1e55e2 100644 --- a/include/teqp/constants.hpp +++ b/include/teqp/constants.hpp @@ -4,8 +4,8 @@ const double N_A = 6.02214076e23; ///< Avogadro's number ///< Gas constant, according to CODATA 2019, in the given number type template<typename NumType> -const NumType get_R_gas() { +const auto get_R_gas() { const double k_B = 1.380649e-23; ///< Boltzmann constant const double N_A = 6.02214076e23; ///< Avogadro's number - return N_A*k_B; + return forceeval(static_cast<NumType>(N_A*k_B)); }; \ No newline at end of file