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

Clarification on minimum suported C++ version. #44

Open
DavidLoftus opened this issue Oct 21, 2019 · 2 comments
Open

Clarification on minimum suported C++ version. #44

DavidLoftus opened this issue Oct 21, 2019 · 2 comments

Comments

@DavidLoftus
Copy link
Contributor

Many of the recent Pull Requests have experienced issues with build failures due to the old GCC 5 on Travis CI (this might be a bug in the travis config as the intended version seems to be 6). Many of the modern C++ features (11 and above) don't appear to be fully supported.

I couldn't find anything explicitly stating that this library should support C++98 compilers. Could you clarify what is the minimum version we should target, and then update the cmake config to reflect this.

Personally I don't see any reason to keep support for C++98, as this is a new library there is no legacy code that depends on it compiling in C++98. Additionally many features we know and love (smart pointers, lambdas, auto, move semantics, etc.)

@amiremohamadi
Copy link
Owner

amiremohamadi commented Oct 21, 2019

My opinion is to keep DuckX as compatible as possible with different C++ versions, but if We have to, We can switch to higher versions (such as C ++11).

@apples
Copy link

apples commented Oct 21, 2019

It's worth considering that this library works with the docx format, which is mainly used on Windows desktops.

Mainstream support for VS 2013 ended a few months ago (extended support ends in 2024). VS 2015 has full C++11 support (except two-phase lookup and expression sfinae), and significant support for C++14.

In my opinion, it would be best to allow for C++11 or even C++14. Most contributors will assume C++11 at a minimum. MSVC and GCC default to C++14. It would also generally improve the cleanliness/safety/efficiency of the code.

Ideally, the required CMake version would also be bumped up to 3.1, to allow for use of the CXX_STANDARD property.

If you still wish to target C++98/03, then it would be best to make it explicit in the CMakeLists, either by using the CXX_STANDARD property, or by adding a -std=c++03 or equivalent compiler flag. This would ensure that contributors get compile errors when trying to use newer language features.

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

No branches or pull requests

3 participants