-
Notifications
You must be signed in to change notification settings - Fork 449
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 support for c++17 compilers #107
Conversation
a lot of warning poped up from g++7 "will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]" These can be remove when compiling with c++17 compiler flag Additionally: VS2015 and greater will now use noexcept, was not enabled by accident The benchmarks has to be disabled, because of compile errors in noniuose (no warnings) libnonius/nonius#97
e.g: "Warning C4714: function 'class rttr::type __thiscall rttr::detail::variant_sequential_view_private::get_rank_type(unsigned int)const ' marked as __forceinline"
can we merge my disable-warning PR #100 improvements together with this one, and work on this in one PR? otherwise my work is kind of lost... |
Strangly clang++ 7.0 does not define
This does not compile as it should. also clang documentation does not say anythin about it: https://clang.llvm.org/docs/LanguageExtensions.html#langext-has-feature-back-compat |
I made some progress building, merged your PR #107 |
@gabyx
We have to use the one without |
* some clean up of the travis script (no more downloading of clang from llvm website)
private field 'm_value' is not used [-Werror,-Wunused-private-field]
hm ah :) I only looked on cpp reference :). crazy how much one needs to know to make it feasible. have you already thought about de flags? in the video he says cmake should find out what compiler flags one should use? I have no clue how he meant it. I mean to compile the library one needs at least -std=...., he also mentioned not to use Werror...
Is there a way to give a set of compile flags such that when cmake finds the library and import its target they are reasonable and make sense. So far nothing is imposed when you use find_package? i think this is good so isnt it?
|
…ke choose the appropriate flag It will be tryed to use the latest c++ standard (atm. C++17) However, at least c++11 compiler is required ( this info will now be stored and checked in the generated cmake scripts) - removed useless dependency settings in the benchmarks (DRY) - added new cmake function for settting default compiler warnings
looks very good! |
I think my branch gets obsolete, which is good =) |
so we can avoid initialization of the c compiler from cmake
added function overload to select const/non const function with 'noexcept' specifier
Otherwise, we get following compile error: /usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directory #include <asm/errno.h>
new cmake func: get_latest_supported_cxx * moved clang travis ci jobs down again It is possibel to mix a new compiler with an old standard library (e.g. clang 4.0 with c++17 support and using c++14 STL version, this leeds to the latest problems)
I merged all your change, I still left my set_warning_levels to be able to compile everything also the benchmarks and tests. |
added download of boost libraries for clang-4.0 build
Now, it should build all linux targets fine (when travis will retrieve the package) PS: for your tests, I suggest moving the macOSX clang targets on top. |
we have some problems with (
|
may be we need something along the line:
|
Try to fix it |
is there an include That would explaing the strange compiler error (i dont get it, I mean why first at the end?) there are more accessing |
@acki-m Could you give me access such that I can kill the travis builds for my PR...? |
@acki-m : Success full AppleClang build here on macOs 10.11.6 with AppleClang 8.0.0 (unit tests ok!) |
How can I give you access to travis builds? Didn't found anything. |
error C2752: 'template_type_trait<std::array<bool, 100>>': more than one partial specialization matches the template argument list note: could be 'template_type_trait<T<N>>' note: or 'template_type_trait<T<N>>' Reported to MS
The error msg was: _Pragma ("clang diagnostic ignored \"-Wnoexcept-type\"") The version scheme for clang on MacOSX is different then for the other operating systems. The version prior clang 9 on mac did not support this pragma. So we disable it. thx to @gabyx
@gabyx
|
I merged your PR into mine: the only differences they have now is: mine builds everything on every platform -> because of different compiler warnings for benchmarks and tests. |
@acki-m: I think if you add me as a collaborator in your master repo. I will not push anything, you can also restrict that I think. Maybe then I have travis rights.. .-) |
@gabyx Another approach would be, generating these kind of check by cmake. Anyway, we should really come to an end here and finally merge the changes to master, so that we get something. No more big changes. |
For sure we should finish up, mine branch compiles too (travis sometimes just refuses to apt-get packages..., but its working as you can see) Would you be happy with this? I think the changes in both PRs are perfect =) |
@gabyx |
on #100 : I am right now testing, if the os x build works, if so, I will rechange the order and it would be final for merging |
rejected PR, in favor of PR: #100 |
a lot of warning poped up from g++7
"will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]"
These can be remove when compiling with c++17 compiler flag
Additionally: VS2015 and greater will now use noexcept, was not enabled by accident
The benchmarks has to be disabled, because of compile errors in noniuose (no warnings)
libnonius/nonius#97