Andrei Alexandrescu [EMAIL PROTECTED] writes:
Ah, one more point that was discussed... there was much around operator-
and operator* which don't make sense for certain resources. With Loki's
SmartPtr, you can disable these two functions. Granted, the error message
would be different, such as
I might not have followed the discussion to deeply, but it does look to me
like John is entirely right. Traits can fundamentally do one customization
per type. That's not going to be enough if you have the same type
representing multiple handles, as is the case with many C APIs. For
example,
John Madsen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
- A policy based design to whereas the policy extends the classes
interface.
- Stronger typing (the types are different based on typename, not on
traits). The traits approach seems fundamentally flawed as two separate
types
Gregory Colvin [EMAIL PROTECTED] writes:
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 drop the wrappers directly into
On Tuesday, Jul 22, 2003, at 05:56 America/Denver, David Abrahams wrote:
Gregory Colvin [EMAIL PROTECTED] writes:
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
Gregory Colvin [EMAIL PROTECTED] writes:
Some conversions are worse than others. For example, an implicit
conversion from a raw pointer to an owning handle/smart-pointer is
far more dangerous than the opposite conversion.
Agreed. It is the latter conversions I like.
That said, I'm pretty
Gennadiy Rozental [EMAIL PROTECTED] wrote:
I read all of the previous discussion of this on the boost list and did
not
find any good arguments against mine.
1) Pointer specific features have been removed for smart_handle. Both
implicit and explicit type coercion features are gone as are
Anthony Liguori [EMAIL PROTECTED] wrote:
Being primarily a Unix developer, I think this library could have a
great use in Unix as long as it can do a few things. Namely, it needs
to be flexible enough to deal with C style inherent (i.e. it should
allow for custom features for socket type but I
Eugene Lazutkin [EMAIL PROTECTED] wrote:
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
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 drop
the
wrappers directly into existing code that uses the wrapped types. I
like
Alan Bellingham [EMAIL PROTECTED] writes:
did they give you the name of this library?
Presumably this is WTL - the Windows Template Library.
That's the one.
--
I've used it and it's great!
I hated MFC for a long time, WTL is indeed cool!
And as far as I know it's developed by 3
Gregory Colvin [EMAIL PROTECTED] writes:
On Saturday, Jul 19, 2003, at 20:52 America/Denver, Ross Smith wrote:
On Sunday 20 July 2003 11:46, Gregory Colvin wrote:
There are no Powers That Be. Boost has no policy-based smart
pointers because nobody has done the difficult job of proposing
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
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
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
Eugene Lazutkin [EMAIL PROTECTED] writes:
It looks like reasonable goal. Personally I found that there are two cases:
1) If there is large existing API = use smart handles. In this case smart
handle serves two purposes:
a) provides invisible housekeeping (like destruction of underlying
Hi,
I do not want to start this discussion all over again, but in the reasoning
you presenting I did not find anything new to justify another smart
pointer like component. It's only one simple case of PBSP and I do not see
any reason not to use it.
Gennadiy.
How do you measure failure? Certainly MFC is primitive, but tens of
thousands of developers use it every day. There are better
alternatives - Microsoft tells me they have been shipping an
unsupported library which is what MFC would have been if we'd
started with templates.
did they give you the
Victor A. Wagner Jr.:
How do you measure failure? Certainly MFC is primitive, but tens of
thousands of developers use it every day. There are better
alternatives - Microsoft tells me they have been shipping an
unsupported library which is what MFC would have been if we'd
started with templates.
Alan Bellingham [EMAIL PROTECTED] writes:
did they give you the name of this library?
Presumably this is WTL - the Windows Template Library.
That's the one.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
___
Unsubscribe other changes:
Eugene Lazutkin [EMAIL PROTECTED] wrote:
Inline,
John Madsen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have little experience with X-Windows, so I can't comment on that.
However,
there is absolutely *nothing* in the smart_handle library that is platform
specific. Just
Gennadiy Rozental [EMAIL PROTECTED] wrote:
Hi,
I do not want to start this discussion all over again, but in the reasoning
you presenting I did not find anything new to justify another smart
pointer like component. It's only one simple case of PBSP and I do not see
any reason not to use it.
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
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
Eugene Lazutkin [EMAIL PROTECTED] wrote:
Inline.
already suggested that it would be worthwhile for FILE*s and file
descriptors.
I am not in position to judge their reasons --- I never had this need. Maybe
I avoided their specific problems somehow. Or these problems are not
frequent enough.
Eugene Lazutkin [EMAIL PROTECTED] wrote:
I have a few comments in no particular order.
1) I cannot imaging someone programming in C++ and using FILE*s,and file
descriptors instead of iostream Co. You've must be talking about
incomplete systems like embedded systems, which don't have complete
Larry Evans [EMAIL PROTECTED] wrote:
wouldn't deadlock detection be another application? Taking the
definition directly from my long-ago OS course memory, a deadlock
occurs when one task or process holds a handle to a lock on a
resource required by another task, which in turn, holds another
On Friday, Jul 18, 2003, at 15:21 America/Denver, John Madsen wrote:
Eugene Lazutkin [EMAIL PROTECTED] wrote:
I have a few comments in no particular order.
1) I cannot imaging someone programming in C++ and using FILE*s,and
file
descriptors instead of iostream Co. You've must be talking about
On Saturday 19 July 2003 09:21, John Madsen wrote:
Eugene Lazutkin [EMAIL PROTECTED] wrote:
4) Sometimes destruction of handles is more than a simple call to
one-argument procedure. Real example from Windows, which is
encountered frequently:
HDC hDC = GetDC(hWindow);
// do some
Eugene Lazutkin wrote:
I have a few comments in no particular order.
1) I cannot imaging someone programming in C++ and using FILE*s,and file
descriptors instead of iostream Co. You've must be talking about
incomplete systems like embedded systems, which don't have complete standard
C++ library.
30 matches
Mail list logo