Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2006-03-30 17:43:12


James Hughes wrote:
> Some more information on this...
>
> Looking at the headers that give the error, there appears to be an issue
> with the result types returned from parsers....
>
> boost/spirit/core/parser.hpp
>
> template <typename DerivedT>
> struct parser
> {
> typedef DerivedT embed_t;
> typedef DerivedT derived_t;
> typedef plain_parser_category parser_category_t;
>
> template <typename ScannerT>
> struct result
> {
> typedef typename match_result<ScannerT, nil_t>::type type;
> };
>
>
> boost/spirit/core/primitives/numerics.hpp
>
> struct sign_parser : public parser<sign_parser>
> {
> typedef sign_parser self_t;
>
> template <typename ScannerT>
> struct result
> {
> typedef typename match_result<ScannerT, bool>::type type;
> };
>
>
> The derived sign_parser class appears to want to 'override' the base class
> struct result, but instead the compiler is giving an error. This would
> appear to be a compiler fault, but I could be way off there - depends
> whether this compiles in other circumstances!! I am still at loss to fix
> this so all help gratefully received!

The spirit list is the proper venue for spirit related questions.
spirit-general_at_lists.sourceforge.net.

Anyway... I am not sure what the workaround is here. I do not
have access to g++3.4.3. We've tested against all versions of
g++ (including 2.95.3 for Spirit 1.6.x) and I don't recall
any problems. I am currently testing against 3.4.4 and I see
no problems. Do you have a minimal cpp test file I can try?
Perhaps posting the compiler errors might help.

Regards,

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

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