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
Loading
Please register or sign in to comment