Boost logo

Boost Users :

Subject: Re: [Boost-users] Defining Statements with Proto
From: Eric Niebler (eric_at_[hidden])
Date: 2010-01-05 04:47:39


On 1/5/2010 3:43 PM, David A. Greene wrote:
> On Sunday 03 January 2010 21:00:31 Eric Niebler wrote:
>
>> So you know that the topmost node of an if_ statement has a tag type of
>> boost::proto::tag::subscript. So you should create a case_
>> specialization on that tag type, as follows:
>>
>> template<>
>> struct ConstructGrammarCases::case_<boost::proto::tag::subscript>
>
> So I tried that before and it didn't work. I tried again and it still fails
> (check attached testcase). I'm using boost 1.40 if it matters.

In your code, you have:

   #ifdef NO_SPECIALIZATION
   template<>
   struct
ConstructStatementGrammarCases::case_<boost::proto::tag::subscript>

I'm sure if you change your ifdef to ifndef, or just remove the PP gunk,
you'll see that it works.

-- 
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