From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,31d5d62cd1d0755,start X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,31d5d62cd1d0755,start X-Google-Attributes: gid1164f8,public From: Valentin Koch Subject: Strange warning when compiling with cxx 6.2 Date: 2000/05/18 Message-ID: <3923E84C.10DDF60A@nagra.com>#1/1 X-Deja-AN: 624966450 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@urbanet.ch X-Trace: news1.urbanet.ch 958654576 2425 195.202.224.148 (18 May 2000 12:56:16 GMT) Organization: Nagra-Kudelski SA Mime-Version: 1.0 NNTP-Posting-Date: 18 May 2000 12:56:16 GMT Newsgroups: comp.sys.dec,comp.unix.osf.osf1 Hello, has anyone an idea what the following warning means: cxx: Warning: Test.cxx, line 250: initial value of reference to non-const must be an lvalue myResult = CSingleton::instance().myFunc(); -----------^ Following what happens in myFunc: Result CSingleton::myFunc() { Result theResult; ... return theResult; }; struct Result { auto_ptr myStruct; string myString; }; And in Test.cxx: Result myResult; if(...) { myResult = CSingleton::instance().myFunc(); }