Skip to content

pass C++11 flag to castxml #33

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

Merged
merged 1 commit into from
Feb 20, 2016
Merged

pass C++11 flag to castxml #33

merged 1 commit into from
Feb 20, 2016

Conversation

mamoll
Copy link
Contributor

@mamoll mamoll commented Feb 20, 2016

Just putting in "-std=c++11" in cflags is not sufficient. Without this change, I get errors like these:

In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdexcept:45:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:234:20: error: 
      cannot combine with previous 'char16_t' declaration specifier
typedef __char16_t char16_t;
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:235:20: error: 
      cannot combine with previous 'char32_t' declaration specifier
typedef __char32_t char32_t;
                   ^
2 errors generated.

This fix should probably generalized to cover C++14 and C++17 as well.

@iMichka
Copy link
Collaborator

iMichka commented Feb 20, 2016

Hi; thanks for the patch.

I was able to reproduce this. It happens as soon as you use #include <iostream> and use cflags="-std=c++11".

I'll merge the patch, and generalise it for C++14 and C++17 (probably in a more generic way, by looking for c++XX). I'll also be able to write a test for this.

Is this something you would need in a stable release soon ? I can create a 1.7.3 version with theses changes, and get it out in a week or two.

iMichka added a commit that referenced this pull request Feb 20, 2016
Pass C++11 flag to castxml
@iMichka iMichka merged commit 5f8ef99 into CastXML:develop Feb 20, 2016
@mamoll
Copy link
Contributor Author

mamoll commented Feb 20, 2016

I don't need this released soon. This is all part of an overhaul of another project (ompl) to be C++11-only. That will take some time. Thanks for offering, though!

@iMichka iMichka added this to the 1.7.3 milestone Feb 20, 2016
iMichka added a commit that referenced this pull request Feb 20, 2016
This extends the previous commit, and adds a test. See #33.
@iMichka
Copy link
Collaborator

iMichka commented Feb 20, 2016

Ok. I added a test and allowed more c++ versions. I'll probably make a 1.7.3 version in a few weeks, so this will be added to it.

iMichka added a commit that referenced this pull request Mar 10, 2016
This extends the previous commit, and adds a test. See #33.

Cherry-picked from the develop branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants