Re: [boost] get_pointer

2002-11-30 Thread Peter Dimov
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

Re: [boost] get_pointer

2002-11-30 Thread David Abrahams
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

Re: [boost] get_pointer

2002-11-30 Thread Peter Dimov
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

Re: [boost] get_pointer

2002-11-30 Thread David Abrahams
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

Re: [boost] get_pointer

2002-11-30 Thread Peter Dimov
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 {

Re: [boost] get_pointer

2002-11-30 Thread David Abrahams
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

[boost] get_pointer

2002-11-29 Thread David Abrahams
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] *