-
Notifications
You must be signed in to change notification settings - Fork 50
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
Build opm-core with C++0x support if available #82
Conversation
These files are shamelessly ripped from dune-common/m4 (e28ca3)
Surely this must have been a copy&paste error.
Since DUNE does this, it might a good idea to track the same ABI.
@bska |
@bska |
By adding an extra test we can avoid the somehow illogical possibility of building with '--enable-gxx11check --disable-gxx0xcheck'.
@bska 056bce2 is supposed to fix something which I believe is just a typo; they use the same option to check for both C++11 and C++0x (you can't disable C++11 and keep C++0x, then). |
@bska |
Brilliant! Thank you so much. |
Hmm. That's a bit strange. When I apply this change locally, I too manage to reproduce the issue of #79. This is using both GCC 4.4 and GCC 4.7. I don't know what prevented me from seeing the issue earlier, but now I'm leaning towards #79 being a genuine (C++11) bug in GCC 4.7 gives a rather helpful diagnostic
Especially, a |
Indeed. It still looks like a compiler/library bug; the standard says (or used to say at least :-)) that 'this' was either 'T_' or 'const T_', depending. Anyway, the following assignment compiles fine: Also, this example compiles with #include <utility>
struct Foo {
std::pair<Foo*,int> bar () {
return std::make_pair (this, 0);
}
}; At this point, I'll just be a coward and tip over the game table by declaring that we can just create the std::pair directly since we already know the components' types -- commited as 09f458 ;-) |
Build opm-core with C++0x support if available
The externally visible header files of DUNE seems to be using two features if available: HAVE_STATIC_ASSERT and HAVE_NULLPTR, so I have added the macros that test for these.
@blattms
I think commit 056bce2 may be interesting for DUNE itself; you may want to cherry-pick that one.