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

            Bug ID: 112410
           Summary: error when auto(x) is used in a variable initializer
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vanyacpp at gmail dot com
  Target Milestone: ---

int x = auto(42); // OK
int y(auto(42));  // error

On the second line GCC -std=c++23 gives an error:

error: non-function 'y' declared as implicit template

I believe the code is correct and should compile without errors.

Reply via email to