AK: Add a Checked::unchecked_value() function

This is used in Jakt.
This commit is contained in:
Ali Mohammad Pur 2022-12-09 20:04:40 +03:30 committed by Ali Mohammad Pur
parent b65258c093
commit c547b55a00
Notes: sideshowbarker 2024-07-17 03:26:52 +09:00

View file

@ -168,6 +168,11 @@ public:
return m_value;
}
ALWAYS_INLINE constexpr T value_unchecked() const
{
return m_value;
}
constexpr void add(T other)
{
m_overflow |= __builtin_add_overflow(m_value, other, &m_value);