move to C++17#2718
Conversation
|
Which version of GCC, or Linux distro, supports C++ 17? We have to consider server OS things. |
|
Any required changes on premake script? |
|
https://gcc.gnu.org/projects/cxx-status.html#cxx17 C++17 mode is the default since GCC 11
|
|
For premake, you should use the cppdialect option to pass the language version, and will take care of setting the compiler flags (there's an option for rtti as well) |
Thank you! @purerosefallen |
4b5751b to
fcb3a8c
Compare
|
does it work now? |
|
yes |
|
怎么还没合并…… |
|
I think what we should do is fix the code to be compatible with the new C++ standard, rather than breaking compatibility with the old standard just to use some new features for non-essential functionality. |
like what? |
constexpr if I guess it will be optimized by compiler already |
|
For the record, using new features in C++17 is not "breaking compatibility". |
https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170
Most C++17 features are supported in VS2017~2019, which is at least 6 years ago.
Maybe it is time to move to C++17.
(update the conclusion in #2603)
some C++17 feautures we may need:
related:
mercury233/irrlicht#7
@mercury233
@purerosefallen
@Wind2009-Louse
@fallenstardust