Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c++ keywords not defined (e.g. and, or, ...) #778

Closed
schroeca-zz opened this issue Feb 16, 2016 · 8 comments
Closed

c++ keywords not defined (e.g. and, or, ...) #778

schroeca-zz opened this issue Feb 16, 2016 · 8 comments

Comments

@schroeca-zz
Copy link

c++ keywords can not be used in source file --> leads to an parser error

This will crash:

void test()
{
    if (a == 3 and b == 5)
    {

    }
}

This will work:

void test()
{
    if (a == 3 && b == 5)
    {

    }
}
@guwirth
Copy link
Collaborator

guwirth commented Feb 16, 2016

@schroeca yes not supported yet
possible workarround #define and &&

@guwirth
Copy link
Collaborator

guwirth commented Feb 29, 2016

Link to description: https://en.m.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#C.2B.2B_operator_synonyms.
This link sounds more like a preprocessor extension? Maybe we have to double check with standard.

@guwirth
Copy link
Collaborator

guwirth commented Mar 6, 2016

There are two possibilities to solve this:

What are you thinking?

@guwirth guwirth self-assigned this Mar 6, 2016
@schroeca-zz
Copy link
Author

I will include the iso646.h. That seems to be the easiest solution on this.

Thx

@lcintrat
Copy link
Contributor

While working on #761, I saw that override is not part of CxxKeyword too.

@guwirth
Copy link
Collaborator

guwirth commented Mar 13, 2016

For override and final see #675

@lcintrat
Copy link
Contributor

Oh ok, good to know !

@guwirth guwirth added this to the 0.9.7 milestone Oct 17, 2016
@guwirth guwirth modified the milestones: subsequent release, 0.9.7 Dec 25, 2016
@guwirth
Copy link
Collaborator

guwirth commented Oct 3, 2017

Solution is to use iso646.h header file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants