This is the mail archive of the gcc@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]

Re: Is that code valid ?


Olivier Galibert wrote:
> kftabdlg.cpp:549: parse error before `;'
> Line 549 is "return(QDate::QDate());"
> 
> Changing that line to "return QDate();" works perfectly though.

That is valid code, since the class name is found in its own scope. 
Hence, one should be able to repeat `QDate::' arbitrary many times.  In
other words, assuming the proper declarations, the following is
perfectly valid, albeit weird code:

  return (QDate::QDate::QDate::QDate ());

Cheers,
//lat
-- 
Lassi.Tuura@cern.ch          There's no sunrise without a night


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