Skip to content

Commit

Permalink
fix: creation of std::string_view in basic_fixed_string::view() n…
Browse files Browse the repository at this point in the history
…ow is compatible with C++20
  • Loading branch information
mpusz committed Jan 18, 2024
1 parent 901e718 commit 5183a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/include/mp-units/bits/external/fixed_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct basic_fixed_string {

[[nodiscard]] constexpr std::basic_string_view<CharT> view() const noexcept
{
return std::basic_string_view<CharT>(*this);
return std::basic_string_view<CharT>(cbegin(), cend());
}

template<std::size_t N2>
Expand Down

0 comments on commit 5183a5c

Please sign in to comment.