Boost logo

Boost :

From: Rani Sharoni (rani_sharoni_at_[hidden])
Date: 2003-12-10 04:24:14


David Abrahams wrote:
> "Rani Sharoni" <rani_sharoni_at_[hidden]> writes:
>
>> // function are somehow incomplete types
>> typedef int test[is_incomplete< void(int) >::value];
>
> I don't think so;
This is why I wrote "somehow". Functions types are not objects types (per
3.9/9) yet they are remarkably consistent with the behaviour of incomplete
types.

> are you allowed to do arithmetic on function pointers?
There are no built-in candidates operators since function type is not object
type which makes the code compliant for function types (the compiler I
checked agree about that).
For example according to 13.6/13:
For every cv-qualified or cv-unqualified *object type* T there exist
candidate operator functions of the form T* operator+(T*, ptrdiff_t);

AFAIKT it's not clear from the standard if the completeness to the type in
such cases affects the *viability* of the built-in operator candidate in
overloading.

Rani


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