Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Server Serverless 2023-04-17
Description
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 { |
...
|
};
|