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
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
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