[antlr-interest] Missing operator==() in C++?

Bryan Ewbank ewbank at gmail.com
Fri Mar 4 11:14:29 PST 2005


I'm looking at generated C++ code for a TreeParser with a local AST
type(RefTreeNode), and am getting a compiler error from this:
   bool
   TypeAnalysis::traverse(RefTreeNode _t)
   {
      bool b = true;
      RefTreeNode traverse_AST_in = (_t == ASTNULL) ?
RefTreeNode(antlr::nullAST) : _t;

In particular, _t == ASTNULL complains for one of our target machines
because _t and ASTNULL are different types (RefTreeNode versus RefAST)
-- it's an *old* C++ compiler.

Thoughts and/or insight?


More information about the antlr-interest mailing list