Boost logo

Boost :

Subject: Re: [boost] [proto] Error with Proto Domains in 1.45
From: Eric Niebler (eric_at_[hidden])
Date: 2011-07-29 18:04:03


On 7/29/2011 12:52 PM, Fernando Pelliccioni wrote:
> Hi Eric, hi all,
>
> I'm getting the following errors when I try to compile the example in the
> atteched file.
>
> test_proto_145.cpp: In function ‘int main()’:
> test_proto_145.cpp:91: error: no match for ‘operator<<’ in ‘emergency << 1’
>
> I am using Boost 1.45 and GCC 4.4.5
> This works fine in 1.46.0 and above.
>
> Is there a patch ?

If upgrading Boost isn't an option, you have have a couple of other
work-arounds. First, you can replace the proto/operators.hpp with the
attached. Or, you can change your LevelGrammar to accept other terminal
types, like:

struct LevelGrammar
  : boost::proto::or_<
        LevelTerminals
      , boost::proto::terminal<boost::proto::_>
      , boost::proto::shift_left<
            LevelGrammar
          , boost::proto::not_< LevelTerminals >
>
>
{};

HTH,

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



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