ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Re: Fw: An omnipotant swap?
by =?windows-1252?Q?JOAQUIN_LOPEZ_MU=3FZ?= other posts by this author
Sep 9 2003 7:17PM messages near this date
[boost] Re: halting graph algorithms | Re: [boost] Re: Fw: An omnipotant swap?
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.

Maybe I'm wong, but it is not clear to me how enable_if
could be used to such effect.

----- Mensaje Original -----
De: "David B. Held" <dheld@[...].com> 
Fecha: Martes, Septiembre 9, 2003 5:35 pm
Asunto: [boost] Re: Fw: An omnipotant swap?

>  > "JOAQUIN LOPEZ MU?Z" <joaquin@[...].es> wrote in message
>  > news:622b45eb8b.5eb8b622b4@[...]..
>  > This crucial point of this technique is having an utility
>  > to determine member function existence at compile-time.
>  > A quick google on the Usenet reveals similar snippets
>  > of code to do this, all of them more or less related and
>  > with various degrees of success across a wide span of
>  > compilers. Maybe some bold booster can have them
>  > refactored in a metaprogramming utility with as many
>  > compilers supported as possible. I see applications of
>  > this outside the swap problem.
>  
>  I believe it's spelled "enable_if", and it's being discussed
>  even as we speak.
>  
>  Dave
>  
>  
>  
>  
>  _______________________________________________
>  Unsubscribe & other changes: 
>  http://lists.boost.org/mailman/listinfo.cgi/boost

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
=?windows-1252?Q?JOAQUIN_LOPEZ_MU=3FZ?=
John Maddock

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved