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

Remove C++0x standard requirement #4

Open
otherjason opened this issue Apr 24, 2013 · 2 comments
Open

Remove C++0x standard requirement #4

otherjason opened this issue Apr 24, 2013 · 2 comments

Comments

@otherjason
Copy link

It would be useful if pillow could be used on compilers that don't yet support the C++0x standard. It looks like the pillowcore library itself compiles just fine without C++0x support. The Helpers.h file used in the unit tests uses a lambda expression in one spot, which requires C++0x, but that appears to be the only spot where it is explicitly needed. Could this dependency be removed?

@otherjason
Copy link
Author

Looks like I missed some other uses throughout the test cases. Also, the pillowcore library uses std::function, which was introduced in C++11. I tested it on gcc 4.7 without --std=c++0x and it built, but you can't rely upon std::function being available if you don't have a C++11-capable compiler. This might not be feasible after all.

@acossette
Copy link
Owner

Hi jason,

Indeed, currently the tests depend on c++0x/c++11 compiler support (pretty much only for lambdas and std::function). This could probably be remedied with a few macros.

In the meantime, the parts of pillowcore that use std::function (in HttpHandler.h and HttpHandlerSimpleRouter.h) should automatically be omitted when your compiler does not support lambdas, as it is wrapped in a check for the Q_COMPILER_LAMBDA define.

Thus, you can build and use the pillowcore library without a C++0x/C++11 compiler, but you cannot run the tests for now...

mnutt added a commit to mnutt/pillow that referenced this issue Aug 30, 2024
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