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++/16319] Template behaves differently with pointers depending on their source


------- 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


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