diff options
Diffstat (limited to 'include/fud_string_view.hpp')
-rw-r--r-- | include/fud_string_view.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/fud_string_view.hpp b/include/fud_string_view.hpp index 972630a..6403c27 100644 --- a/include/fud_string_view.hpp +++ b/include/fud_string_view.hpp @@ -30,6 +30,12 @@ namespace fud { class String; struct StringView { + template <size_t N> + consteval StringView(const utf8 (&input)[N]) : m_length{N - 1}, m_data{input} + { + static_assert(N > 0); + } + constexpr StringView() noexcept = default; constexpr StringView(const StringView& rhs) noexcept = default; |