|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-02-12 10:05:26
On Wednesday 12 February 2003 01:08 am, Lin Xu wrote:
> Yeah, I guess it would. The syntax I had before was limited by my lack of
> knowledge about how to extract the arguments and return type from a
> classtype. But I can use function_traits<> right? But that requires partial
> template specialization. Is there a way to get the types without PTS? How
> does boost::function do it? Maybe I can mirror the syntax of
> boost::Function. But boost::function doesn't have the function pointer as
> an actual template parameter.
There is no known way to extract the argument types from function pointers or
member function pointers without PTS. The class template boost::function only
works when the compiler can handle it (which includes requiring PTS);
otherwise the user is stuck with function0, function1, etc.
> I dont' know how to make that syntax work. I did originally want syntax
> like that, but I didn't know how to write it without PTS (or a least
> support non-PTS compilers nicely).
Don't kill a good design because of bad compilers.
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk