From: Vesa Karvonen (vesa_karvonen_at_[hidden])
Date: 2002-03-19 06:09:47
>I'm trying to use the BPL for the following and I'm kind of stuck.
I have trouble understanding the intention. If you just want a new syntax
for specifying function types, then I would recommend to not do it. If you
want a macro for specifying functions types that take N arguments of a
single type, then there might be some sense. What is it that you are trying
Are you positive about the syntax of function typedefs that you seem to be
trying to achieve? The following is a representative of a function
declaration (of 1 parameter):
To get a typedef from any declaration, you just put `typedef´ in front of
typedef ret_type fun_type(param);
Anyway, you obviously need to pass the param to the macro. Try the
typedef ret_type f_name(MAKE_FUNCTION_TYPE_NAME(f_name))\
The above (probably) isn't what you were after, however. You probably want
to be able to pass an arbitrary number of parameters:
typedef void bar(bar_type)(foo_type,int,long)
The above can be done, but I do not understand the motivation. You might
want to consider using lists.
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk