diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index 36b975a..daf4898 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -165,6 +165,7 @@ struct char_equal_to { template class static_string { +static_assert(N < UINT16_MAX, "Length of static_string must be less than UINT16_MAX."); public: constexpr explicit static_string(string_view str) noexcept : static_string{str, std::make_index_sequence{}} { assert(str.size() == N);