diff --git a/include/concept.h b/include/concept.h index 6eb123f..2145e9f 100644 --- a/include/concept.h +++ b/include/concept.h @@ -34,7 +34,7 @@ concept explicit_convertible_to = && std::constructible_from <_To, _From>; template -concept has_length = requires { _Tp::_Bit_Len; }; +concept has_length = requires { { +_Tp::_Bit_Len } -> std::same_as ; }; template concept bit_type = has_length <_Tp> && explicit_convertible_to <_Tp, max_size_t>; diff --git a/include/register.h b/include/register.h index f81849a..67220dd 100644 --- a/include/register.h +++ b/include/register.h @@ -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() {} diff --git a/include/wire.h b/include/wire.h index 77bcb31..5c1bf7e 100644 --- a/include/wire.h +++ b/include/wire.h @@ -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),