[Bf-committers] Parameter name conflicts with C++ keyword

Dmitriy Mazovka mazovka at bk.ru
Fri Jul 28 20:27:08 CEST 2006


Hello, I used DNA_node_types.h header in C++ library (SkyGen gsoc project), and
faced the problem: structure bNode declares parameter 'new' - C++ keyword.
I temporary overcome this by defining 'new' macro:

#define new _new
#include <DNA_node_types.h>
#define new new

but, of course the solution is not acceptable.
I want to say that there will always be a problem to use this header in C++
modules, so better to rename bNode's variable (and refactor) to something like this:

typedef struct bNode {
   struct bNode *next, *prev, *new_node;
   ...

Best regards




More information about the Bf-committers mailing list