Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Re: non-const r...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 7 Topic 45776 of 47034
Post > Topic >>

Re: non-const reference to tem****ary derived from pure virtual Base

by "sk_usenet" <sometechyguy at gmail dot com> May 6, 2008 at 09:40 AM

"Erik Wikström" <Erik-wikstrom@[EMAIL PROTECTED]
> wrote in message
> On 2008-05-06 16:41, reppisch wrote:
>> Hi Ng,
>>
>> besides that this style may be asking for trouble i'm faced with a
>> unexpected gcc behaviour. Tested with gcc 3.3.3.
>> On M$ .Net this compiles just fine.
>>
>> I'm trying to make a non-const reference to a tem****ary object. The
>> object is derived from a pure virtual base, so the compiler can't
create
>> a copy of base-type.
>
> Are you sure VS.NET allowed that? If that is the case you really should
> check the options you provide to the compiler because making a non-const
> reference to a tem****ary is forbidden by the standard.

Yes, by default VC allows this as an extension to Standrad (I tested a
long 
time back on probably v7.0). I think it's the /Za option in VC compiler
that 
would flash the error.

-- 
http://techytalk.googlepages.com
 




 7 Posts in Topic:
non-const reference to temporary derived from pure virtual Base
reppisch <spam@[EMAIL   2008-05-06 16:41:40 
Re: non-const reference to temporary derived from pure virtual B
reppisch <spam@[EMAIL   2008-05-06 17:17:16 
Re: non-const reference to temporary derived from pure virtual B
Andrey Tarasevich <and  2008-05-06 10:33:20 
Re: non-const reference to temporary derived from pure virtual B
=?ISO-8859-1?Q?Marcel_M=F  2008-05-06 17:16:38 
Re: non-const reference to temporary derived from pure virtual B
=?UTF-8?B?RXJpayBXaWtzdHL  2008-05-06 16:29:20 
Re: non-const reference to temporary derived from pure virtual B
"sk_usenet" <  2008-05-06 09:40:48 
Re: non-const reference to temporary derived from pure virtual B
Andrey Tarasevich <and  2008-05-06 10:45:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 3:06:26 CDT 2008.