This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Possible messaging changes
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Arthur Schwarz <aschwarz1309 at verizon dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 10 Apr 2009 18:35:51 +0100
- Subject: Re: Possible messaging changes
- References: <164665.31638.qm@web84004.mail.mud.yahoo.com>
Arthur Schwarz wrote:
> /*
> * m3.cpp
> */
>
> # include <istream>
> # include <istream>
>
> using namespace std;
>
> ifstream x;
> ifstream y();
> If 'std::ifstream' not found, why is 'std::ifstream y();' legal?
Ooh, I know this one. It's because it's not a definition of an ifstream
object constructed by a default constructor. It's a forward declaration of a
function y() taking no args and returning an ifstream object by value.
cheers,
DaveK