Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2007-02-02 19:52:25


"Alexander Nasonov" <alnsn_at_[hidden]> wrote
> Arkadiy Vertleyb wrote:
> > Only if you can prove that it works on all the compilers ;-)
>
> It works on many popular compilers. I'm preparing a new version of
> scope_exit which is based on this trick. I compiled it successfully
> on vc8, gcc 3.4 and intel-linux 8.1.

It seems that gcc 3.3.3 (debug mode) is the problem.

This is from an email we exchanged with Peder:

On 6/6/05, Arkadiy Vertleyb <vertleyb_at_[hidden]> wrote:
> > > Looks like my problems are related to GCC 3.3.3 (which we probably
want
> >to
> > > support). This GCC version can't stand if __typeof__() is wrapped
into
> > > anything while inside a template:
> > >
> > > typedef mpl::identity<__typeof__(1 + 0.5)>::type type; // OK
> > >
> > > template<class T> class A
> > > {
> > > typedef __typeof__(1 + 0.5) type; // OK
> > > typedef mpl::identity<__typeof__(1 + 0.5)>::type type; // ICE
> > > };
> > >
> > > GCC 3.4.2 seem to be fine with this.
> > >
> > > Thoughts?
> >
> >How about:
> >template<typename T>
> >mpl::identity<T> make(const T&)
> >
> >__typeof__(make(expr))::type
> >?
>
> Nope -- I tried this too :-(

Since this was an interface issue, we could not change it unless we can
implement it on _ALL_ supported compilers... So we gave up :-(

Regards,
Arkadiy


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