-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Server Serverless 2023-04-17
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The presence of this attribute allows the compiler to catch dangling references.
std::string_view has this annotation. we should follow suit.
"This ensures that constructing a StringPiece (StringData in our case) from a temporary (xvalue)
std::string will produce a compiler warning (error for us). And it
matches the annotation libc++ does for std::string_view."
https://bugs.chromium.org/p/chromium/issues/detail?id=1282468
class [[gsl::Pointer]] StringData {
...
};