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

Consider moving back to C++11 #35

Closed
droidmonkey opened this issue Feb 15, 2017 · 2 comments
Closed

Consider moving back to C++11 #35

droidmonkey opened this issue Feb 15, 2017 · 2 comments

Comments

@droidmonkey
Copy link

Motivation

C++14 is still not widely supported by Linux baselines. Furthermore, the v3.0 release is FAR superior to the v2.1 release, yet the requirement for C++14 largely has nothing to do with that superiority.

We are looking to integrate qhttp into KeePassXC but we cannot move to C++14 due to backwards compatibility.

Details

There are only two places in the code that require the use of C++14:

httpparser.hxx#L98
which can easily be fixed by changing the auto to TImpl* since you are static casting it anyway.

httpwriter.hxx#L87
This loop block was rewritten in C++14 syntax for no obvious gain. It can be easily reverted back to the C++11 equivalent:

        for ( auto cit = TBase::iheaders.constBegin(); cit != TBase::iheaders.constEnd(); cit++ ) {
            const QByteArray& field = cit.key();
            const QByteArray& value = cit.value();

            writeHeader(field, value);
        }
@oliviermaridat
Copy link

For a project of my company, I did patch successfully qhttp v3.0 to move back to C++11 (and also supports Qt 5.3 which was another requirement for us). As @droidmonkey said, it was not that big.

@oliviermaridat
Copy link

oliviermaridat commented Aug 18, 2017

For your information, I released the backport here: https://github.com/oliviermaridat/qhttp

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

2 participants