[Prev][Next][Index]

Re: inconsistency in overloaded operator identifiers



>but
>
>operator~() returns "operator~"
>
>This is probably an oversight from when operator~() was added.

That's a bug. In order to fix it, make the following changes
in pC++2dep/vlex.c

diff -r1.30 vlex.c
479c479
< #define isanop(d) ((d == '+') || (d == '-') || (d == '&') || (d == '|') || (d == '<') || (d == '>') || (d == '*') || (d == '/') || (d ==  
'%') || (d == '^') || (d == '!') || (d == '=') )
---
> #define isanop(d) ((d == '+') || (d == '-') || (d == '&') || (d == '|') || (d == '<') || (d == '>') || (d == '*') || (d == '/') || (d ==  
'%') || (d == '^') || (d == '!') || (d == '=') || (d == '~'))
764c764
<       while (isalnum(c) || (c == '_') || (c == '~'))
---
>       while (isalnum(c) || (c == '_') /* ||  (c == '~') */)
1177a1178
>     case '~':

The line numbers should agree with those in version 1.7.     --Beata