Boost logo

Boost :

From: João Abecasis (jpabecasis_at_[hidden])
Date: 2006-05-30 19:25:34


David Abrahams wrote:
> João Abecasis <jpabecasis_at_[hidden]> writes:
>> 1 - support for function pointers was completely broken. Specifically, I
>> learned that result_of doesn't handle cv-qualified function pointers.
>
> Shouldn't we fix result_of?

I think so. I posted about the issues I found with result_of and
is_pointer separately.

>> 2 - Random Access Sequences were required when Forward Sequences would
>> have been sufficient. Here I failed to grasp the Fusion Concepts while
>> porting unpack_args from Fusion v1.
>
>> 3 - Function references weren't handled at all.
>
> A result_of problem, or something else?

In this case, something else, in my naive implementation I thought
everything would be solved with a simple:

     typedef result_of<F(A0, ..., AN)>::type result_type;

But it turns out that if F is a function the compiler will complain that
we're trying to write a function returning a function. In the end, what
I did, specifically for this case, was to add a pointer to the function
type.

Here I also found an issue with cv-qualified functions (if they do
exist...) and is_function. This one seems to be gcc-4.x specific.

Best regards,

João


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk