Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ae310806 authored by Atneya Nair's avatar Atneya Nair
Browse files

Add StaticStringView Utility

We frequently pass and store strings that are generated/known at
compile-time. Since these strings are constant, we can place them in
static storage, and be guaranteed that their lifetime is valid
throughout the duration of the program. This allows us to pass
non-owning references (such as string_view) without any concern for
lifetime validity.

The StaticStringView is a string_view whose referant is a static,
constant string.  Additionally, we can concatenate and
convert from string literals at compile time for typical log-string
generation.

Test: atest StaticStringTests
Bug: 238654698
Change-Id: I067bd4330dcc39dc0bde269fb67306484c275faa
parent cf6ae6c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment