|
Boost : |
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-11-18 07:47:38
Matthias Schabel wrote:
> I've got some MPL-heavy code (attached) which crashes CW 8.3 on Mac OS
> X : I get
> the following error :
>
> Error : internal compiler error (report to <cw_bug_at_[hidden]>)
> while executing in file 'CTemplateClass.c' line: 270
> (compiling '' in 'test_dimensional_analysis.cpp')
> full_lambda.hpp line 381 > type;
>
> The same code compiles and executes correctly using gcc 3.3. Any
> suggestions on workarounds
Seems like in certain contexts the compiler cannot deal with the 'list'
template:
#include <boost/mpl/list.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/lambda.hpp>
using namespace boost::mpl;
int main()
{
typedef begin< list<int> >::type t;
typedef lambda< list<int> >::type l;
}
# -----------------------------------------
# 78: : lambda_impl< F<T1>,Tag,true_ >
# Error: ^
# internal compiler error (report to <cw_bug_at_[hidden]>)
# while executing in file 'CTemplateClass.c' line: 270
Weirdly, the numbered form ('list0...n') seem to be fine:
int main()
{
typedef begin< list1<int> >::type t;
typedef lambda< list1<int> >::type l;
^^^^^
}
I might get to the root of it and provide a workaround in the core of the
library, but it definitely looks like a nasty one.
Meanwhile, I suggest you to switch to using numbered lists/vectors.
> (other than reporting it to Metrowerks, which, since they're now at
> CW9, would undoubtedly be useless unless I was fishing for a suggestion
> to buy the new compiler)?
Not necessarily useless. I wouldn't be surprised if CW9 still has it.
Aleksey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk