From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21847 invoked by alias); 23 Apr 2003 12:21:34 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 21837 invoked from network); 23 Apr 2003 12:21:29 -0000 Received: from unknown (HELO to1fres01.replynet.prv) (62.101.100.5) by sources.redhat.com with SMTP; 23 Apr 2003 12:21:29 -0000 Received: from to1fres01.replynet.prv ([172.16.1.8]) by to1fres01.replynet.prv with Microsoft SMTPSVC(5.0.2195.5329); Wed, 23 Apr 2003 14:22:38 +0200 Received: from flender.reply.it ([172.16.1.254]) by to1fres01.replynet.prv with Microsoft SMTPSVC(5.0.2195.5329); Wed, 23 Apr 2003 14:22:37 +0200 Message-Id: <5.1.1.6.2.20030423140157.027cee48@pop3.reply.it> X-Sender: i.molella@pop3.reply.it Date: Wed, 23 Apr 2003 13:29:00 -0000 To: gcc@gcc.gnu.org From: Ivan Molella Subject: compiler confusion? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-OriginalArrivalTime: 23 Apr 2003 12:22:37.0630 (UTC) FILETIME=[06DA05E0:01C30993] X-SW-Source: 2003-04/txt/msg01146.txt.bz2 i' have the follwing problem: I' have the following assertion class: template class Assert { public: typedef Excp exception_throwed; Assert(bool val, const char* msg_throwed, long code) : value(val), message(msg_throwed), excCode(code) { } Assert(bool val, string msg_throwed, long code) : value(val), message(msg_throwed), excCode(code) { } void do_assert() { if (!(value)) throw exception_throwed(message, excCode); } private: bool value; const string message; long excCode; }; when i use this assertion in the following code: void telnetClient::init(const string pTelnetProg,char* const* pArgs,char* const*pEnv,int _timeout) { ..... 31> Assert((checkProcessStatus() == telnetClient::process_running),"[MM CO=EBEX_TELNET_L0016 MM]",PROCESS_DOWN_ERROR).do_assert(); .... } i have the following error: telnetClient.cpp: In member function `void telnetClient::init(std::basic_string, std::allocator >, char* const*, char* const*, int)': telnetClient.cpp:31: parse error before `==' token while if i do: void telnetClient::init(const string pTelnetProg,char* const* pArgs,char* const*pEnv,int _timeout) { ..... 31> Assert((this->checkProcessStatus() == telnetClient::process_running),"[MM CO=EBEX_TELNET_L0016 MM]",PROCESS_DOWN_ERROR).do_assert(); .... } compilation is done without any error. What's the matter with the first expression? Thanks in advance. checkProcessStatus is so defined: bool telnetClient::checkProcessStatus() { if (task.isAlive()==telnetClient::process_terminated){ return telnetClient::process_terminated; } return telnetClient::process_running; } Ci sono 10 categorie di persone: quelli che sanno contare in binario e tutti gli altri.