fix(register): fix wrong rvalue binding (should be const ref)

This commit is contained in:
DarkSharpness
2024-07-11 22:12:59 +08:00
parent 3dce8b2c23
commit 0d3d27d202

View File

@ -36,7 +36,7 @@ struct Register {
Register &operator=(const Register &rhs) = delete;
template <concepts::bit_convertible <_Len> _Tp>
void operator <= (_Tp &&value) {
void operator <= (const _Tp &value) {
debug::assert(!this->_M_assigned, "Register is double assigned in this cycle.");
this->_M_assigned = true;
this->_M_new = static_cast <max_size_t> (value);