From: David Abrahams [EMAIL PROTECTED]
Hi,
I'm wondering whether the get_pointer function used by mem_fn et
al. is really justified. Since you can't invoke a member function on a
null pointer anyway, why not simply use *p for this purpose?
The original reason for using get_pointer in mem_fn
Peter Dimov [EMAIL PROTECTED] writes:
From: David Abrahams [EMAIL PROTECTED]
Hi,
I'm wondering whether the get_pointer function used by mem_fn et
al. is really justified. Since you can't invoke a member function on a
null pointer anyway, why not simply use *p for this purpose?
The
From: David Abrahams [EMAIL PROTECTED]
Peter Dimov [EMAIL PROTECTED] writes:
On the other hand... the ((*p).*f)(...) form would work with most smart
pointers and iterators, so it might be worth exploring.
Yes, and in particular it would work with std::auto_ptr, which I know
is not a
Peter Dimov [EMAIL PROTECTED] writes:
It's fairly easy to provide a get_pointer for std::auto_ptr. ;-)
One that works for regular pointers as well, and works on msvc6? I'd
love to see that!
It ought to
be in std:: but a boost:: overload would do as well since the pointer
version is in
From: David Abrahams [EMAIL PROTECTED]
Peter Dimov [EMAIL PROTECTED] writes:
It's fairly easy to provide a get_pointer for std::auto_ptr. ;-)
One that works for regular pointers as well, and works on msvc6? I'd
love to see that!
Now I'm not sure what you mean.
namespace boost
{
Peter Dimov [EMAIL PROTECTED] writes:
From: David Abrahams [EMAIL PROTECTED]
Peter Dimov [EMAIL PROTECTED] writes:
It's fairly easy to provide a get_pointer for std::auto_ptr. ;-)
One that works for regular pointers as well, and works on msvc6? I'd
love to see that!
Now I'm not sure
Hi,
I'm wondering whether the get_pointer function used by mem_fn et
al. is really justified. Since you can't invoke a member function on a
null pointer anyway, why not simply use *p for this purpose?
-Dave
--
David Abrahams
[EMAIL PROTECTED] *