by "Jim Langston" <tazmaster@[EMAIL PROTECTED]
>
May 7, 2008 at 07:27 PM
red floyd wrote:
> thucdat@[EMAIL PROTECTED]
wrote:
>> Visual Studio C++ compiles the following:
>>
>>
>>
>> class someclass {
>> //
>> };
>>
>> void somefunction(someclass &) {
>> //
>> }
>>
>> int main() {
>> somefunction(someclass());
>> return 0;
>> }
>>
>>
>>
>> But Dev-C++ (Bloodshed) and g++ don't. I wonder if Visual Studio C++
>> is smarter here.
>
> No, Bloodshed (which uses g++) and g++ are correct. You can't bind a
> tem****ary to a non-const ref. If you turn of MS extensions (I think
> it's /Za) VStudio will also properly generate an error.
Also setting warning levels to 4 in VStudio will produce a warning.
--
Jim Langston
tazmaster@[EMAIL PROTECTED]