From ed4ad9985159c62027cb5d653ba290733e0f6d06 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 4 Mar 2024 11:45:59 +1000 Subject: [PATCH] fixed_string: add string_view operator --- fixed_string.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fixed_string.hpp b/fixed_string.hpp index 62554e3b..975aace4 100644 --- a/fixed_string.hpp +++ b/fixed_string.hpp @@ -32,6 +32,11 @@ namespace cruft { } constexpr operator char const* () const { return value; } + constexpr operator std::string_view () const { return value; } + + constexpr char const* + c_str (void) const noexcept + { return value; } };