Boost logo

Boost Users :

From: Foster, Gareth (gareth.foster_at_[hidden])
Date: 2005-01-06 08:03:33


Interesting stuff, thanks all that replied.

I think was just trying to related the function type to the syntax seen in
other types, the fact is that the function type is a bit special I suppose,
so I should really just take it by itself.

I think I've seen all the possible uses for it thanks to the replies I've
had here anyway. It's always interesting to see syntax from the murkier
corners of the C++ repertoire :)

Thanks again,

Gaz

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of John Maddock
Sent: 06 January 2005 10:45
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Re: a question on boost::is_function

> Could I do ...
>
> int (int) * p_my_function_pointer;
>
> Or some other such madness? I'm reading MSDN about the indirection
> operator
> at the moment, maybe that will help to clear this up in my head. Can you
> recommend a page on "function types".

You can certainly do it via a typedef:

typedef int mysig(int);

mysig* p_my_function; // declares function pointer

mysig myproc; // declares a function called myproc with signature mysig.

John.

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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