[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-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] New: 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 Bug ID: 115960 Summary: gcc throws an error when I use Optional in c++17. Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component