feat: .view() member funciton added to fixed_string

This commit is contained in:
Mateusz Pusz committed 2024-01-18 16:47:16 +01:00
1 parent b7bb1c605d
commit f2be389b57
2 files changed
+9

No files matched your search

@@ -85,6 +85,11 @@ struct basic_fixed_string {
[[nodiscard]] constexpr const_iterator end() const noexcept { return data() + size(); }
[[nodiscard]] constexpr const_iterator cend() const noexcept { return data() + size(); }
[[nodiscard]] constexpr std::basic_string_view<CharT> view() const noexcept
{
return std::basic_string_view<CharT>(*this);
}
template<std::size_t N2>
[[nodiscard]] constexpr friend basic_fixed_string<CharT, N + N2> operator+(
const basic_fixed_string& lhs, const basic_fixed_string<CharT, N2>& rhs) noexcept