fix: fix the wrong type for static member "_Bit_Len"

This commit is contained in:
DarkSharpness
2024-07-11 22:26:10 +08:00
parent 4d287201b9
commit b40b23853b
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ concept explicit_convertible_to =
&& std::constructible_from <_To, _From>;
template <typename _Tp>
concept has_length = requires { _Tp::_Bit_Len; };
concept has_length = requires { { +_Tp::_Bit_Len } -> std::same_as <std::size_t>; };
template <typename _Tp>
concept bit_type = has_length <_Tp> && explicit_convertible_to <_Tp, max_size_t>;

View File

@ -26,7 +26,7 @@ struct Register {
}
public:
static constexpr bool _Bit_Len = _Len;
static constexpr std::size_t _Bit_Len = _Len;
explicit Register() : _M_old(), _M_new(), _M_assigned() {}

View File

@ -73,7 +73,7 @@ struct Wire {
}
public:
static constexpr bool _Bit_Len = _Len;
static constexpr std::size_t _Bit_Len = _Len;
explicit Wire() :
_M_func(new details::EmptyWire),