Boost logo

Boost :

From: Rani Sharoni (rani_sharoni_at_[hidden])
Date: 2003-12-15 09:10:53


Daniel Frey wrote:
> Rani Sharoni wrote:
>
> > [...]
>
>> struct A;
>> typedef int test[is_incomplete<A>::value];
>
> Just curious:
>
> struct A;
> typedef int test[is_incomplete<A>::value];
> struct A {};
> typedef int test[!is_incomplete<A>::value];
>
> Does this work, too? (Can't check it myself currently...)

Completing class A yield undefined behavior since the completeness of the
type should not affect overload resolution. This makes my implementation
undefined by definition :).
Nevertheless diagnostic is not required and this is basic "assumption" of
the is_incomplete "designers".

The above code is also ill-formed since POI in unique in each translation
unit.

Rani


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