From 5183a5c830265269891ba806f9f39f0434355783 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 18 Jan 2024 18:41:29 +0100 Subject: [PATCH] fix: creation of `std::string_view` in `basic_fixed_string::view()` now is compatible with C++20 --- src/core/include/mp-units/bits/external/fixed_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/include/mp-units/bits/external/fixed_string.h b/src/core/include/mp-units/bits/external/fixed_string.h index d595f907..eec60ed4 100644 --- a/src/core/include/mp-units/bits/external/fixed_string.h +++ b/src/core/include/mp-units/bits/external/fixed_string.h @@ -88,7 +88,7 @@ struct basic_fixed_string { [[nodiscard]] constexpr std::basic_string_view view() const noexcept { - return std::basic_string_view(*this); + return std::basic_string_view(cbegin(), cend()); } template