[Bug c++/85977] Incorrect handling of array reference size deduction
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 29 18:17:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85977
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-05-29
CC| |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed. We get:
85977.C: In function ‘void bar()’:
85977.C:4:13: error: no matching function for call to ‘foo(<brace-enclosed
initializer list>)’
foo({1,2,3});
^
85977.C:2:6: note: candidate: ‘template<int N> void foo(const long int (&)[N])’
void foo(const long (&arr)[N]) {}
^~~
85977.C:2:6: note: template argument deduction/substitution failed:
85977.C:4:13: note: mismatched types ‘long int’ and ‘int’
foo({1,2,3});
^
More information about the Gcc-bugs
mailing list