This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11582] Odd error message with dynamically sized template arg printing


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11582

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-02 00:30:07 UTC ---
t788.cc: In function âvoid g()â:
t788.cc:6:10: error: no matching function for call to âf(int
[(((sizetype)<anonymous>) + 1)])â
t788.cc:6:10: note: candidate is:
t788.cc:2:28: note: template<int N> void f(int (&)[N])
t788.cc:2:28: note:   template argument deduction/substitution failed:
t788.cc:6:10: note:   variable-sized array type âint [(((sizetype)<anonymous>)
+ 1)]â is not a valid template argument

And
t7881.cc: In function âvoid g()â:
t7881.cc:6:10: error: no matching function for call to âf(int
[(((sizetype)<anonymous>) + 1)])â
t7881.cc:6:10: note: candidate is:
t7881.cc:2:23: note: template<int N> void f(int (&)[N])
t7881.cc:2:23: note:   template argument deduction/substitution failed:
t7881.cc:6:10: note:   variable-sized array type âint [(((sizetype)<anonymous>)
+ 1)]â is not a valid template argument


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]