Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Strange warning when compiling with cxx 6.2
@ 2000-05-18  4:00 Valentin Koch
  2000-05-18  4:00 ` Daniel S. Riley
  0 siblings, 1 reply; 2+ messages in thread
From: Valentin Koch @ 2000-05-18  4:00 UTC (permalink / raw)


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<AStruct> myStruct;
   string myString;
 };

And in Test.cxx:

 Result myResult;
 if(...) {
   myResult = CSingleton::instance().myFunc();
 }



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-05-18  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-18  4:00 Strange warning when compiling with cxx 6.2 Valentin Koch
2000-05-18  4:00 ` Daniel S. Riley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox