// The constant base "a" that is being used to compute f_{ut}.
constexpr float A_CONST = 6.76;
// The max number of ratings by any given user on a given date. This
// was found by create_f_u_t.py.
constexpr int MAX_NUM_RAT_USER_DATE = 2651;
// The maximum possible value for f_{ut} is the floor of the log base
// "a" of the maximum number of ratings by any user on a given date.
auto BB = std::floor(std::log(MAX_NUM_RAT_USER_DATE)/std::log(A_CONST));
constexpr int MAX_F_U_T = BB;
< /code>
Это дает мне ошибку! Когда я компилируюсь, это < /p>
говорит: ошибка: переменная constexpr 'max_f_u_t' должно быть инициализировано с помощью
постоянное выражение
contexpr int max_f_t = bb; < /p>
< /blockquote>
Подробнее здесь: https://stackoverflow.com/questions/442 ... -constexpr