https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99923

            Bug ID: 99923
           Summary: Rejects valid if statement with default argument
                    concept
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/zPPMEaa33

template <class = void>  concept C = true;
void foo() { if (C<>) return; }

gcc rejects this valid grammar with:

<source>: In function 'void foo()':
<source>:2:18: error: expected 'auto' or 'decltype(auto)' after 'C<>'
    2 | void foo() { if (C<>) return; }
      |                  ^~~

Reply via email to