This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/5786] array types decay too quickly
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2005 16:02:45 -0000
- Subject: [Bug c++/5786] array types decay too quickly
- References: <20020226090601.5786.david.abrahams@rcn.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-16 16:02 -------
(In reply to comment #5)
> This could be fixed already...
It is not:
t.cc: In function ?int main()?:
t.cc:15: error: invalid initialization of non-const reference of type ?const int (&)[2][4]? from a temporary
of type ?int [2][4]?
t.cc:2: error: in passing argument 1 of ?void print1(const T (&)[N]) [with T = int [4], unsigned int N =
2u]?
t.cc:16: error: invalid initialization of non-const reference of type ?const int (&)[2][4]? from a temporary
of type ?int [2][4]?
t.cc:7: error: in passing argument 1 of ?void print2(const T (&)[N][M]) [with T = int, unsigned int N = 2u,
unsigned int M = 4u]?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5786