[Bug c++/16319] Template behaves differently with pointers depending on their source
dgr24 at drexel dot edu
gcc-bugzilla@gcc.gnu.org
Thu Jul 1 20:13:00 GMT 2004
------- Additional Comments From dgr24 at drexel dot edu 2004-07-01 20:13 -------
Subject: Re: Template behaves differently with pointers
depending on their source
Thanks, and sorry for the false alarm.
bangerth at dealii dot org wrote:
> ------- Additional Comments From bangerth at dealii dot org 2004-07-01 20:03 -------
> The compiler is correct:
> &a[0]
> is a temporary variable of type int*; you can't bind it to
> a reference of type T&, i.e. int*&.
>
> In the two other instances you give, you pass a variable rather
> than a temporary to the reference argument, which the compiler correctly
> allows.
>
> W.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16319
More information about the Gcc-bugs
mailing list