You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I too encountered this issue. However, it seems intentional to me because this library aims to support C++11 which does not allow operator overloads to be constexpr. I did not look very closely into the code, but I think constexpr could be conditionally enabled for C++14 using version specific macros
Binary operators like:
template <typename B, typename I, unsigned int F, bool R>
constexpr inline fixed<B, I, F, R> operator+(const fixed<B, I, F, R>& x, const fixed<B, I, F, R>& y) noexcept
{
return fixed<B, I, F, R>(x) += y;
}
are defined as constexpr but the += operator is never constexpr which results in a "cannot result in a constant expression" error.
The text was updated successfully, but these errors were encountered: