What is a string_span?
Guidelines Support Library Review: string_span<T>
by Marius Bancila
From the article:
In a previous post I have introduced the
span<T>
type from the Guidelines Support Library. This is a non-owning range of contiguous memory recommended to be used instead of pointers (and size counter) or standard containers (such asvector
orarray
).span<T>
can be used withstring
s, but the Guidelines Support Library provides a different span implementation for various types of strings. These string span types are available in thestring_span.h
header.
Add a Comment
Comments are closed.