[Bug c++/85977] New: Incorrect handling of array reference size deduction

jeremy at jeremyms dot com gcc-bugzilla@gcc.gnu.org
Tue May 29 16:24:00 GMT 2018


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

            Bug ID: 85977
           Summary: Incorrect handling of array reference size deduction
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeremy at jeremyms dot com
  Target Milestone: ---

This code should compile, but does not.

template <int N>
void foo(const long (&arr)[N]) {}
void bar() {
 foo({1,2,3});
}

See discussion here:
https://groups.google.com/a/isocpp.org/forum/#!topic/std-discussion/FS5lNgf9_pQ


More information about the Gcc-bugs mailing list