Boost logo

Boost Users :

From: Cromwell Enage (sponage_at_[hidden])
Date: 2007-02-28 16:44:28


--- Frank Mori Hess wrote:
> Cromwell Enage wrote:
> > Assuming a compiler supports is_function, will
> > this metafunction check for the presence of
> > member functions in a class? For example:
> >
> > struct Foo
> > {
> > void bar();
> > };
> >
> > struct Baz
> > {
> > };
> >
> > Given the right template argument, will
> > is_function detect the bar() function in Foo
> > but return false_ for Baz? If so, what is the
> > right template argument?
>
> I think it will return false for both. Maybe
> "is_member_function_pointer"
> would be more useful for you?

is_member_function_pointer will not compile if bar is
not a member of Baz. However, if I can find a way to
detect whether bar is a member of Baz, then I can use
is_member_function_pointer in conjunction with
BOOST_TYPEOF. The question now is, does such a method
exist?

                              Cromwell D. Enage

 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net