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

Make opm-core compilable in C++0x mode on Ubuntu Precise #81

Merged
merged 1 commit into from
Oct 24, 2012

Conversation

rolk
Copy link
Member

@rolk rolk commented Oct 24, 2012

No description provided.



// macro to insert const_cast to get a round bug in GCC 4.6.3 where it
// suddenly believes that this is a const pointer, although we are not in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind highlighting the word 'this' in the above (e.g., ...believes that "this" is a...)? I think that will assist the would-be reader who might otherwise have a hard time interpreting the sentence in isolation.

@bska
Copy link
Member

bska commented Oct 24, 2012

Have you been able to track down a bug number in GCC's issue tracker that describes this issue?

It complains about not finding a match for the pair<> template class,
because the first parameter (this) is allegedly const. However, this
isn't a const method, so I suspect it is a compiler bug.

In order to move on, I slap on a harmless cast which will make this
particular compiler happy, and which should have no effects elsewhere,
but put it in a #if..#else..#endif macro to avoid warnings on others;
hopefully this also makes it easier to spot and remove in the future.
@bska
Copy link
Member

bska commented Oct 24, 2012

Thanks.

I'll merge the change.

bska added a commit that referenced this pull request Oct 24, 2012
Make opm-core compilable in C++0x mode on Ubuntu Precise
@bska bska merged commit 29ccdb7 into OPM:master Oct 24, 2012
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