Re: [boost] Re: Fw: An omnipotant swap?
by John Maddock other posts by this author
Sep 10 2003 12:10PM messages near this date
Re: [boost] Re: Fw: An omnipotant swap?
|
[boost] [optional] update
> I think I haven't made myself clear enough. enable_if
> controls whether a given function enters (or not) into the overload
> resolution set of a function name for a given type.
> What I'm talking about is an utility that determines
> if a certain member function of a type does exist. Something like
>
> has_mem_fn<T,void (T::*)(T&), &T::swap>::type
>
> evaluating to true iff T has such a swap method. As I'm writing this,
> seems to me this could only be achieved with some macro
> machinery.
Correct, one would have to define a macro that generated the template
meta-function specifically for the member function you're testing for, I was
just so surprised that this was actually possible that I just had to post
what seemed like a semi-obvious solution to the swap issue.
John.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
=?windows-1252?Q?JOAQUIN_LOPEZ_MU=3FZ?=
John Maddock
|