|
From: Peter B. <pb...@hg...> - 2004-10-04 10:29:06
|
> Thanks for your reply. But the problem is there is a > lot of code in the library I am using. It compiles > using Microsoft based compilers. Let alone an error > there is not even a single warning that is displayed > while compiling using Microsoft based compilers. > Non const references can only bind to lvalues. A temporary is an rvalue. Using code in this way requires a compiler that works the way you expect. Or in other words: that code is not portable. As pointed out in the postings this concerns non constant references to temporary objects. Switch off MS specific language extensions on your MS-compiler (/Za). What do you get now? > I also tried compiling this code using an older > version of GCC under Linux but there I got some other > error. > gcc error messages may vary from version to version ;-) Peter |