Open otherjason opened 11 years ago
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.
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...
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?