|
Boost : |
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-03-09 22:12:47
Andreas Huber wrote:
> Hi Aleksey
Hi Andreas,
>
> Sometimes I have to pass an abstract class to mpl::aux::msvc_eti_base.
> On MSVC7.0 the compiler complains with the following error:
>
> d:\Data\boostCvsRoot\boost\boost\mpl\aux_\is_msvc_eti_arg.hpp(48) :
> error C2259: 'boost::mpl::inherit2<T1,T2>' : cannot instantiate
> abstract class ...
>
> The following patch to the current CVS version seems to fix this:
>
> RCS file: /cvsroot/boost/boost/boost/mpl/aux_/is_msvc_eti_arg.hpp,v
> retrieving revision 1.1
> diff -r1.1 is_msvc_eti_arg.hpp
> 48c48
> < static T get();
> ---
> > static const T & get();
>
> Since T is never cv-qualified or a reference, this should work under all
> circumstances.
Uhmm, actually 'is_msvc_eti_arg' can be used in other contexts, including
the ones where T can be everything, and in particular a reference; so, in
the long run, we'll have to do something a little bit more sophisticated to
fix it, but for now 'T&' will do. Fixed in the CVS.
> P.S. Just to make sure you've seen it:
>
> http://lists.boost.org/MailArchives/boost/msg44601.php
>
> It's definitely low prio because it's a *warning* appearing only on
MSVC7.1.
There were two issues there - 'distance' returning an unsigned type, and,
as you've pointed out, the 'advance' implementation itself. Both fixed in
the
CVS now.
Thanks for the report,
Aleksey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk