delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/05/09:30:24

From: Ian Miller <itmiller AT dera DOT gov DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Incomprehensible Warning ...
Date: 05 Jun 1998 13:20:23 +0100
Organization: Defence Evaluation & Research Agency
Lines: 26
Message-ID: <87k96wjb08.fsf@hasn.dera.gov.uk>
References: <1998060509563900 DOT FAA21150 AT ladder03 DOT news DOT aol DOT com>
NNTP-Posting-Host: 146.80.115.106
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

gsm77 AT aol DOT com (GSM77) writes:

> Sorry, but i'm French ...

Don't apologise :)

> I got this warning : 
> 
> "initialization of non-const reference `struct X &' from rvalue 'X'
> in passing argument 2 of `operator >>(istream &, X &)'" 
> 
> The program is like this :
> =============================
>...
> 
> istream &
> operator >> ( istream & f, Y & b)
>   {
>     f >> static_cast <X> (b);  /* It's on this line... */
           ^^^^^^^^^^^
What is "static_cast"? Is it standard, because I don't know it?

-- 
Ian Miller, Dorset, UK
The views expressed above are entirely those of the writer and do not represent
the views, policy, or understanding of any other person or official body.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019