|
Boost : |
From: Itay (itay_maman_at_[hidden])
Date: 2002-07-16 09:16:04
"Giovanni Bajo" <giovannibajo_at_[hidden]> wrote in message
news:123201c22cab$cc77fac0$7a4e2a97_at_bagio...
>
> ----- Original Message -----
> From: Itay Maman
> To: boost_at_[hidden]
> Sent: Tuesday, July 16, 2002 10:45 AM
> Subject: Re: [boost] boost::variant 0.2 (was: Yet another ...)
>
>
> >An updated version of boost::variant is now available at:
> http://groups.yahoo.com/group/boost/files/boost_variant_160702.zip. This
> version is compatbile with these compilers: GCC >3.0.4, CodeWarrior 7.0,
> MSVC 6 and MSVC 7.
> >Please note that test4 is currently broken with MSVC 7, since it
> instantiates variants with more than 8 types. The other 3 compilers use
the
> RDSL (Reduced Dot-Style Typelist) >mechanism, so they don't impose this
> restriction. Anyway, I expect this issue to be fixed with MPL's formal
> relese code.
>
> >Comments and compatibility reports are welcomed.
>
> All the tests work on Comeau but the first one which still triggers an
> internal Comeau 'issue' (it generates a symbol name too long for MSVC to
> handle it). Just two questions, from a quick look I gave to the examples.
> Please, simply ignore them if they have been already answered, I'll go
back
> looking for them in the loooong variant threads :)
>
> - Why variant_casts cast between pointers instead of objects (references)?
There are three overloaded versions of variant_cast (well, six if you count
the MSVC specific workarounds): The first two return a pointer/const
pointers, while the third returns an object.
> - 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)
-Itay
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk