[Bug c++/115960] gcc throws an error when I use Optional in c++17.

2024-07-18 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115960 --- Comment #7 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #6) > (In reply to Noah Williams from comment #5) > > It isn't? The library I was trying to compile included the "optional" > > header, and I had looked it up and fo

[Bug c++/115960] gcc throws an error when I use Optional in c++17.

2024-07-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115960 --- Comment #6 from Andrew Pinski --- (In reply to Noah Williams from comment #5) > It isn't? The library I was trying to compile included the "optional" > header, and I had looked it up and found it was part of C++ 17, so I thought > it was par

[Bug c++/115960] gcc throws an error when I use Optional in c++17.

2024-07-17 Thread noahmartinwilliams at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115960 --- Comment #5 from Noah Williams --- (In reply to Jonathan Wakely from comment #4) > > The problem seems to be that, despite passing "-std=c++17", it doesn't use > > c++17 > > header files for the Optional identifier. > > Why should it? The n

[Bug c++/115960] gcc throws an error when I use Optional in c++17.

2024-07-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115960 --- Comment #4 from Jonathan Wakely --- > The problem seems to be that, despite passing "-std=c++17", it doesn't use > c++17 > header files for the Optional identifier. Why should it? The name "Optional" is not part of any C++ standard.

[Bug c++/115960] gcc throws an error when I use Optional in c++17.

2024-07-16 Thread noahmartinwilliams at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115960 --- Comment #3 from Noah Williams --- (In reply to Andrew Pinski from comment #2) > Anyways this is not a GCC issue. > > The AttrBuilder::addAllocSizeAttr is declared in the preprocessed source > as: > AttrBuilder &addAllocSizeAttr(unsigned E

[Bug c++/115960] gcc throws an error when I use Optional in c++17.

2024-07-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115960 --- Comment #2 from Andrew Pinski --- Anyways this is not a GCC issue. The AttrBuilder::addAllocSizeAttr is declared in the preprocessed source as: AttrBuilder &addAllocSizeAttr(unsigned ElemSizeArg, const std:

[Bug c++/115960] gcc throws an error when I use Optional in c++17.

2024-07-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115960 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED