|
Boost : |
From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-07-16 09:00:14
----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, July 16, 2002 3:21 PM
Subject: Re: [boost] Re: boost::variant 0.2 (was: Yet another ...)
> From: "Itay" <itay_maman_at_[hidden]>
> > > - Is it possibile to autodetect when incomplete<> is needed? Since it
> > > actually depends on things like header include order and such, it
seems
> to
> > > me a hazard forcing the user to specify incomplete<>.
> > >
> > The compiler will refuse to compile the code, when a necessary
> incomplete<>
> > is missing, so there's no real danger here. Anyway, I am not sure it is
> > possible to implement an automatic mechanism for transforming T ->
> > incomplete<T> if T is incomplete. (...But many times I do get
surprised,
> > when innovative solutions are offered to "non-solvable" problems)
>
> Even if there were such a solution, you'd get ODR violations that way,
since
> the same T may be complete at one point and incomplete at another. AFAICS.
Can you please explain why a simple Select<is_incomplete<T>, incomplete<T>,
T> should not work in this situation? Isn't there a is_incomplete trait
somewhere?
Giovanni Bajo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk