Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2004-07-13 19:15:31


David Abrahams wrote:

> "DY, JERRY U (SBCSI)" <jd2419_at_[hidden]> writes:
>
>
>>I'm trying to get spirit parser to compile in aC++, but aC++ errors on
>>the following line. The problem apparently is that aC++ is not
>>recognizing extract_int_ as a type, so a preceding typename keyword is
>>required for it to compile. Hoping to get instruction on how to change
>>this so that it won't break other compilers? Thanks!
>>
>>boost/spirit/core/primitives/impl/numerics.ipp:305
>>
>>return extract_int_<(MaxDigits >= 0)>::template
>> apply<Radix, MinDigits, MaxDigits, Accumulate>::
>> f(scan, n, count);
>>
>>fixed for aC++ is as follows, but may break other compilers??:
>>return typename extract_int_<(MaxDigits >= 0)>::template
>> apply<Radix, MinDigits, MaxDigits, Accumulate>::
>> f(scan, n, count);
>
>
> Nonconforming.
>
> Try this:
>
> typedef typename extract_int_<(MaxDigits >= 0)>::template
> apply<Radix, MinDigits, MaxDigits, Accumulate> extractor;
> extractor::f(scan,n,count);

Forgot the return:

     return extractor::f(scan,n,count);

Applied in the CVS.

Thanks!

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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