Skip to content

Commit

Permalink
- Fixed static_assert guard, comparing the type size
Browse files Browse the repository at this point in the history
  • Loading branch information
meikjaeckle committed Feb 24, 2024
1 parent 439a7d5 commit 3e48a43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/type_safe/flag_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class flag_set
static constexpr flag_set from_int(T intVal)
{
static_assert(std::is_unsigned<T>::value
&& sizeof(T) * CHAR_BIT >= flag_set_traits<Enum>::size(),
&& sizeof(T) <= sizeof(int_type),
"invalid integer type, lossy conversion");
return flag_set(intVal);
}
Expand Down

0 comments on commit 3e48a43

Please sign in to comment.