Remove declaration 'auto' for RAII?

Stewart Gordon smjg_1998 at yahoo.com
Wed Mar 15 08:14:47 PST 2006


Tom wrote:
> In article <op.s6fkcmh7po9bzi at moe>, Chris Miller says...
<snip>
>> They accomplish the same thing, but perhaps scope can be used to indicate  
>> RAII:
>>    scope(raii) Foo f = new Foo;
>> or scope(auto)
>> etc
<snip>

Scope statements themselves create a scope, judging by analogy with 
other statements and the lack of any information to the contrary.  It 
would seem a little strange to make scope(raii) an exception....

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- 
PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on 
the 'group where everyone may benefit.



More information about the Digitalmars-d mailing list