This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6078: Template params in functions not picking up types correctly from arguments
- From: lerdsuwa at gcc dot gnu dot org
- To: f_ker at yahoo dot co dot uk, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 28 Jul 2002 10:51:08 -0000
- Subject: Re: c++/6078: Template params in functions not picking up types correctly from arguments
- Reply-to: lerdsuwa at gcc dot gnu dot org, f_ker at yahoo dot co dot uk, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: Template params in functions not picking up types correctly from arguments
State-Changed-From-To: analyzed->closed
State-Changed-By: lerdsuwa
State-Changed-When: Sun Jul 28 03:51:08 2002
State-Changed-Why:
Not a bug. The displayed candidate cannot be used.
You are initializing the type 'volatile int*&'
with an lvalue returning from the function call ret_func()
which is not allowed. An lvalue can only initialize a
reference of non-volatile constant type (via a temporary
variable). See Section 8.5.3 p4 in the standard for more
details.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6078