From 02e2262d0ab95f409892c7b18edc85e3e1e3db24 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 25 Jul 2024 10:18:07 +1000 Subject: [PATCH] fixed_string: add value_type and begin/end --- cruft/util/fixed_string.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cruft/util/fixed_string.hpp b/cruft/util/fixed_string.hpp index 975aace4..e88e63b3 100644 --- a/cruft/util/fixed_string.hpp +++ b/cruft/util/fixed_string.hpp @@ -21,6 +21,8 @@ namespace cruft { /// extensions). template struct fixed_string { + using value_type = char; + char value[N + 1] {}; static std::size_t size (void) { return N; } @@ -37,6 +39,9 @@ namespace cruft { constexpr char const* c_str (void) const noexcept { return value; } + + auto begin (void) const& noexcept { return std::begin (value); } + auto end (void) const& noexcept { return std::end (value); } };