Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] fatal error C1001: An internal error has occurred in the compiler.
From: Eric Niebler (eric_at_[hidden])
Date: 2009-06-23 21:55:27


christophe henry wrote:
> Hi all,
>
> Here am I already at the 2nd compiler (VC9SP1) crash of the week (not
> kidding...):
>
> fatal error C1001: An internal error has occurred in the compiler.
> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\p2symtab.c', line 5809)
>
> Attached is a test file producing the problem. The crash happens when I
> add BOOST_PROTO_DEFINE_OPERATORS. Am I doing something wrong?

I can't reproduce the error on msvc-9.0 sp1 either with or without the
BOOST_PROTO_DEFINE_OPERATORS line.

> Sadly, this was a workaround to avoid deriving my class from
> proto::terminal because of a problem (supposedly) created by the
> address-of operator. Can someone save my day and tell me if there is a
> way to deactivate this operator for terminals?
> Concretely, I have:
>
> struct Empty: public state<>, proto::terminal<state_tag>
>
> Which brings me, here:
>
> &::boost::fusion::at_key<State>(xxx) // xxx being a fusion set
> containing Empty
>
> the following problem:
>
> 1>f:\projects\MSM2\SM\boost/msm/back/state_machine.hpp(1061) : error
> C2784: '::boost::enable_if<is_pseudo_exit<StateType>::type,void>::type
> boost::msm::back::state_machine<Derived,HistoryPolicy,CopyPolicy>::execute_entry(StateType
> *,const EventType &,FsmType &,boost::msm::back::dummy<__formal>)' :
> could not deduce template argument for 'StateType *' from 'const
> boost::proto::exprns_::expr<Tag,Args,Arity>'

Looks like the error is happening in msm. That doesn't mean it's not
caused by Proto, but it means you're not posting the actual code that's
failing. I can't help without the actual code.

Anyway, Joel's advice is spot-on. You can disable Proto's operator& by
using proto::extends instead of straight inheritance, and specify the
grammar of your DSEL in the domain parameter. Your grammar could be as
simple as: proto::not_<proto::addressof<proto::_> >.

HTH,

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net