[boost] Re: spatial and metric containers

2003-07-25 Thread Eugene Lazutkin
Miroslav Silovic [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: SMTL aims to efficiently solve queries like: a) Which books where written by authors whose last name begins with B between 1986 and 1994? b) How many cities with population above 10,000

[boost] Re: Re: Proposed smart_handle library

2003-07-22 Thread Eugene Lazutkin
Inline. Gregory Colvin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm generally less afraid of automatic conversions than many others, and dropped them from auto_ptr, and later from shared_ptr, only under duress. I like them for wrapper classes because they make it possible to

[boost] Re: Re: Proposed smart_handle library

2003-07-20 Thread Eugene Lazutkin
Inline. John Torjo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Using operator-() and operator*() you use pointer value itself. It is pretty rare situation when you need it directly and not as part of abc-def() or *abc constructs. Example of c_str() is irrelevant --- you can

[boost] Re: Proposed smart_handle library

2003-07-20 Thread Eugene Lazutkin
Inline. John Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you can convince most of the people on this list to provide an automatic conversion, more power to you. I still maintain that avoiding hard to diagnose errors is worth much more than saving 6 characters of

[boost] Re: Proposed smart_handle library

2003-07-19 Thread Eugene Lazutkin
Inline, John Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The main uses of the library as I see it is to handle two main cases: 1) Where a programmer needs to access an API (whether it be from the OS or a 3rd party C API) which uses handle-based resource management and

[boost] Re: Re: Proposed smart_handle library

2003-07-19 Thread Eugene Lazutkin
Ross Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This is easily handled; just use boost::bind(ReleaseDC, hWindow, _1) for the release function. In proposed library release functionality is handled by static function, which is part of trait: struct win_file_handle {

[boost] Re: Proposed smart_handle library

2003-07-19 Thread Eugene Lazutkin
Inline. Jon Biggar [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] For example, on UNIX, to securely create a file, you need to use the O_CREAT and O_EXCL flags to ensure that nobody else created the file first and is just waiting for you to write to it so they can read what you

[boost] Re: Proposed smart_handle library

2003-07-19 Thread Eugene Lazutkin
Inline David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Example for #1. Windows GDI has hundreds (if not thousands) API functions. New versions of Windows introduce new API functions. It doesn't make any sense to cover it with functional wrapper. MFC tried it and

[boost] Re: Proposed smart_handle library

2003-07-19 Thread Eugene Lazutkin
Inline. John Madsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I fail to see how COM is a relevant analogy. The smart_handle classes I've proposed will work on all major platforms unlike COM. Several people have COM was available on all major platforms. I still remember