Re: [boost] 'optional' - request for extension

2003-02-17 Thread Fernando Cacciola \(Home\)
Aleksey Gurtovoy wrote: > Fernando Cacciola wrote: >> OK, I can see the motivation: We can have a noncopyable class >> and need an optional object of it. >> Following optional semantics, it would be spelled: >> >> boost::optional lock; >> if ( cond ) >> lock.reset( RAII_lock(entity) ) ; >> >> Bu

RE: [boost] 'optional' - request for extension

2003-02-14 Thread Aleksey Gurtovoy
Fernando Cacciola wrote: > OK, I can see the motivation: We can have a noncopyable class > and need an optional object of it. > Following optional semantics, it would be spelled: > > boost::optional lock; > if ( cond ) > lock.reset( RAII_lock(entity) ) ; > > But there is a probem: as William poi

RE: [boost] 'optional' - request for extension

2003-02-13 Thread Aleksey Gurtovoy
Anthony Williams wrote: > Aleksey Gurtovoy writes: > > > > The following is a sketch of a potential use case for the > > newly-accepted and already very useful 'optional' class. > > > > Suppose you have a pure RAII guard/locker which unconditionally > > does its job: > > > > struct

Re: [boost] 'optional' - request for extension

2003-02-13 Thread Fernando Cacciola \(Home\)
- Original Message - From: "Anthony Williams" <[EMAIL PROTECTED]> To: "Boost mailing list" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 7:05 AM Subject: Re: [boost] 'optional' - request for extension > Aleksey Gurtovoy writes: >

Re: [boost] 'optional' - request for extension

2003-02-13 Thread Anthony Williams
Aleksey Gurtovoy writes: > > The following is a sketch of a potential use case for the newly-accepted and > already very useful 'optional' class. > > Suppose you have a pure RAII guard/locker which unconditionally does its > job: > > struct RAII_lock > : boost::noncopyable