https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #12 from Jonathan Wakely ---
(In reply to Jason Merrill from comment #11)
> I don't think it's valid to use a plain char array as storage for an object
> of another type; the "provides storage" wording in
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
Jason Merrill changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #10 from Jonathan Wakely ---
Using std::string as a dynamically-resizable buffer of bytes isn't completely
unreasonable, although I can't see many reasons to prefer std::string to
std::vector for that purpose.
For either type, it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #9 from Martin Sebor ---
The possibility of storing something other than char in std::string never
entered my mind, and I'm pretty sure the container was never meant for that.
But whether the standard has all the restrictions in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #8 from Richard Biener ---
(In reply to Martin Sebor from comment #6)
> I've been thinking of one of two kinds of annotation that wouldn't require
> programs to change and would be sufficient if applied only to the definition
> of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #7 from Marc Glisse ---
(In reply to Martin Sebor from comment #6)
> (1) one that would make "std::string::ptr" on par with
> that of any other pointer other than char (i.e., a char that's not allowed
> to be used to access anything
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #6 from Martin Sebor ---
As a baseline, I think it would be great to get std::string to enjoy the same
benefits as other containers WRT aliasing. Going a step further, I'd expect
users of all containers to benefit from the aliasing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
--- Comment #5 from Marc Glisse ---
It has never been very clear to me what restrict means on a struct member, but
I believe adding it to the pointer in vector means that in a function:
void f(vector*a, vector*b)
the compiler could assume that
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
Martin Sebor changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
Resolution|WONTFIX
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93971
Martin Sebor changed:
What|Removed |Added
Summary|C++ containers considered |std::string considered to
11 matches
Mail list logo