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

            Bug ID: 119814
           Summary: requires-clauses think void can be passed to ...
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: blubban at gmail dot com
  Target Milestone: ---

void a(...);
template<auto v>
bool b()
{
    return requires { v(v(1)); };
}
bool c() { return b<a>(); }


Expected: False. a(1) is void, and cannot be passed to a(), even if it's hidden
behind a template parameter.

Actual: True.

https://godbolt.org/z/rvv4aWj15

See also bug 119813, though I suspect the actual root causes are different.

Reply via email to