-
Notifications
You must be signed in to change notification settings - Fork 486
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
Added the C++11 changes back in. Replaces #327 #336
Conversation
I've kept the 'doc' directory with the markdown in it, so hopefully we'll be able to integrate that later on. |
Adds C++11 compilation mode support. Closes #336 Closes $327
@OniDaito Thanks! There was a few issues though, see my additional commits. In case the build is failing (including SOCI_CXX_C11=OFF), feel free to submit additional PRs to correct things. I will try to add C++11 job to Travis CI, but AFAIS setting cutting-edge GCC there is PITA and clang seems to be a troublemaker with Oracle. |
|
||
#if (__GNUC__ == 4 && (__GNUC_MINOR__ > 6)) || (__clang__ == 1) | ||
namespace boost { | ||
std::basic_ostream<char, std::char_traits<char> >& operator<< (std::basic_ostream<char, std::char_traits<char> > & stream, boost::optional<int> const & value){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not inline operator in common-tests.h?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was thinking that as I pasted them again. Should probably do that. It's neater. Cheers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, it's just that kind of thing that raises questions :)
As I said, feel free to improve things with following PRs.
(I do really need to take care of Travis CI for C11 mode, so you have safety net too.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is Clang being a real pain for Oracle then? Presumably we'll see this in the OS X tests as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still unclear myself, so will have to look again before I know what's the problem :)
"inline namespace" doesn't compile in C++98 mode, so the old code broke compilation with g++ 4.7 or later or clang when not using C++11. It also seems to be completely useless as outputting "Currently not supported" just can't be a good idea, so it is not clear why was it added in the first place (see PR #336).
Ok so these are the C++11 changes as discussed I think. I've included all the changes you've made up this point. Is this better for you?